Changes for a `m88k-motorola-sysv3'

Jeffrey A Law law@hurl.cygnus.com
Tue Sep 9 23:43:00 GMT 1997


  In message <199708311428.QAA09619@saturn.s-direktnet.de>you write:
  > + Sun Aug 31 14:27:29 1997  Manfred Hollstein  <manfred@s-direktnet.de>
  > + 
  > + 	* config/m88k/sysv3.h (INITIALIZE_TRAMPOLINE): Redefine to call
  > + 	`__enable_execute_stack()' for m88k-motorola-sysv3 (sysV88).
  > + 	* libgcc2.c (__enable_execute_stack): Use same definition as for
  > + 	dolphin.
I'd like someone else that knows these systems to comment on this patch
(it's appended).  I know zilch about them and thus don't feel all that
comfortable installing patches for them.


  > + 	* config/m88k/m88k.c (m88k_builtin_saveregs): Set MEM_IN_STRUCT_P bit
  > + 	for allocated va_list constructor to avoid moving around instructions
  > + 	during instruction scheduling.
I've installed this (actually I just imported the change from gcc2).

  > + 	* config/m88k/xm-m88k.h (USG): Define only if not already given
  > + 	on the command line.
I've installed this too.

  > + 	* Makefile.in (INSTALL): change to $(srcdir).
  > + 	(mostlyclean): Remove libgcc1-test.
  > + 	(install-common): Reset x-bits if INSTALL_DATA is something like `cp'.
  > + 	(risky-stage1): Remove superfluous blank.
I installed these, except for the one to reset the x-bits.  I would prefer
to do something like redeifne INSTALL_DATA to accept a mode argument which
turns off the x-bits.  Anyone think of a reason not to do that?

Thanks!

Here's just the sysv3.h and libgcc2 patch:

Index: config/m88k/sysv3.h
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/config/m88k/sysv3.h,v
retrieving revision 1.1.1.1
diff -c -3 -p -r1.1.1.1 sysv3.h
*** sysv3.h	1997/08/11 15:57:19	1.1.1.1
--- sysv3.h	1997/09/10 06:42:47
*************** do {									\
*** 137,139 ****
--- 137,157 ----
        if (((int *)__DTOR_LIST__)[i] != -1)	\
  	__DTOR_LIST__[i] ();			\
    } while (0)					
+ 
+ #ifdef sysV88
+ /* manfred@s-direktnet.de: Re-define INITIALIZE_TRAMPOLINE to additionally call
+    __enable_execute_stack.
+    I don't actually have a clue why nobody else than sysV88 and __DOLPHIN__
+    needs to call this; perhaps they didn't ever run the c-torture tests
+    getting segmentations violations and/or bus errors with nested functions.  */
+ #undef INITIALIZE_TRAMPOLINE 
+ #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)			\
+ {									\
+   emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 40)), FNADDR); \
+   emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 36)), CXT); \
+   emit_call_insn (gen_call (gen_rtx (MEM, SImode,			\
+ 			    gen_rtx (SYMBOL_REF, Pmode,			\
+ 				     "__enable_execute_stack")),	\
+ 		  const0_rtx));						\
+ }
+ #endif
Index: libgcc2.c
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/libgcc2.c,v
retrieving revision 1.1.1.1
diff -c -3 -p -r1.1.1.1 libgcc2.c
*** libgcc2.c	1997/08/11 15:57:11	1.1.1.1
--- libgcc2.c	1997/09/10 06:42:50
*************** __enable_execute_stack ()
*** 2827,2833 ****
  }
  #endif /* __convex__ */
  
! #ifdef __DOLPHIN__
  
  /* Modified from the convex -code above.  */
  
--- 2827,2833 ----
  }
  #endif /* __convex__ */
  
! #if defined (__DOLPHIN__) || defined (sysV88)
  
  /* Modified from the convex -code above.  */
  
*************** __enable_execute_stack ()
*** 2857,2863 ****
    errno=save_errno;
  }
  
! #endif /* __DOLPHIN__ */
  
  #ifdef __pyr__
  
--- 2857,2863 ----
    errno=save_errno;
  }
  
! #endif /* __DOLPHIN__ or sysV88 */
  
  #ifdef __pyr__
  



More information about the Gcc mailing list