Fix MAKE_THROW_FRAME on x86

Diego Novillo dnovillo@redhat.com
Sun Feb 8 17:01:00 GMT 2004


MAKE_THROW_FRAME was taking the address of an incoming parameter and
dereferencing it.  The aliasing changes I'm working on were correctly
assuming that all the stores through that pointer were dead.

Fixed by marking the pointer volatile.  Committed as obvious.


Diego.


	* include/i386-signal.h (MAKE_THROW_FRAME): Add volatile qualifier
	to _regs.

Index: include/i386-signal.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/i386-signal.h,v
retrieving revision 1.14.2.2
diff -d -c -p -r1.14.2.2 i386-signal.h
*** include/i386-signal.h	20 Aug 2003 20:45:35 -0000	1.14.2.2
--- include/i386-signal.h	8 Feb 2004 16:40:07 -0000
*************** static void _name (int _dummy)
*** 26,32 ****
  do									\
  {									\
    void **_p = (void **)&_dummy;						\
!   struct sigcontext_struct *_regs = (struct sigcontext_struct *)++_p;	\
  									\
    /* Advance the program counter so that it is after the start of the	\
       instruction:  the x86 exception handler expects			\
--- 26,32 ----
  do									\
  {									\
    void **_p = (void **)&_dummy;						\
!   volatile struct sigcontext_struct *_regs = (struct sigcontext_struct *)++_p;\
  									\
    /* Advance the program counter so that it is after the start of the	\
       instruction:  the x86 exception handler expects			\




More information about the Gcc-patches mailing list