Subject: signal.h context lossage, diff attached
To: None <port-mips@netbsd.org>
From: Christopher SEKIYA <wileyc@rezrov.net>
List: port-mips
Date: 01/20/2003 19:26:48
Hello,
Looks like a critical bit for arch/mips/include/signal.h didn't survive the
nathanw-sa merge. The attached diff seems to do the right thing ... at least,
the compile doesn't choke anymore ...
-- Chris
GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5 938E 023E EEFB FEB9 DE7F)
Index: sys/arch/mips/include/signal.h
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/include/signal.h,v
retrieving revision 1.17
diff -u -r1.17 signal.h
--- sys/arch/mips/include/signal.h 2003/01/18 13:03:17 1.17
+++ sys/arch/mips/include/signal.h 2003/01/20 10:23:07
@@ -104,9 +104,9 @@
(sc)->mulhi = (uc)->uc_mcontext.__gregs[_REG_MDHI]; \
\
if ((uc)->uc_flags & _UC_FPU) { \
- memcpy((sc)->sc_fpregs, \
- (uc)->uc_mcontext.__fpregs.__fp_r.__fpregs32, \
- sizeof((uc)->uc_mcontext.__fpregs.__fp_r.__fpregs32)); \
+ memcpy(&(sc)->sc_fpregs, \
+ &(uc)->uc_mcontext.__fpregs.__fp_r.__fp_regs32, \
+ sizeof((uc)->uc_mcontext.__fpregs.__fp_r.__fp_regs32)); \
(sc)->sc_fpregs[32] = \
(uc)->uc_mcontext.__fpregs.__fp_csr; \
(sc)->sc_fpc_eir = 0; /* XXX */ \
@@ -124,9 +124,9 @@
(uc)->uc_mcontext.__gregs[_REG_MDHI] = (sc)->mulhi; \
\
if ((sc)->sc_fpused) { \
- memcpy((uc)->uc_mcontext.__fpregs.__fp_r.__fpregs32, \
- (sc)->sc_fpregs, \
- sizeof((uc)->uc_mcontext.__fpregs.__fp_r.__fpregs32)); \
+ memcpy(&(uc)->uc_mcontext.__fpregs.__fp_r.__fp_regs32, \
+ &(sc)->sc_fpregs, \
+ sizeof((uc)->uc_mcontext.__fpregs.__fp_r.__fp_regs32)); \
(uc)->uc_mcontext.__fpregs.__fp_csr = \
(sc)->sc_fpregs[32]; \
(uc)->uc_flags |= _UC_FPU; \