Patch applied to sh.h: fix big endian SHcompact passing of 5..8 byte arguments

Joern Rennecke joern.rennecke@superh.com
Mon Jun 24 12:12:00 GMT 2002


Tested for sh64-elf.

-- 
--------------------------
SuperH
2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ
T:+44 1454 462330
-------------- next part --------------
Mon Jun 24 18:53:56 2002  J"orn Rennecke <joern.rennecke@superh.com>

	* sh.h (FUNCTION_ARG_ADVANCE): Take SHCOMPACT_FORCE_ON_STACK
	arguments into account for stack_regs.

Index: config/sh/sh.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.h,v
retrieving revision 1.152
diff -p -r1.152 sh.h
*** config/sh/sh.h	18 Jun 2002 19:03:17 -0000	1.152
--- config/sh/sh.h	24 Jun 2002 17:52:46 -0000
*************** struct sh_args {
*** 1711,1719 ****
  	 (CUM).arg_count[(int) SH_ARG_INT] += numregs;	\
  	 if (TARGET_SHCOMPACT				\
  	     && SHCOMPACT_FORCE_ON_STACK (MODE_, TYPE_)) \
! 	   (CUM).call_cookie 				\
! 	     |= CALL_COOKIE_INT_REG (((CUM).arg_count[(int) SH_ARG_INT] \
! 				      - numregs), 1);	\
  	 else if ((CUM).byref)				\
  	   {						\
  	     if (! (CUM).outgoing)			\
--- 1711,1723 ----
  	 (CUM).arg_count[(int) SH_ARG_INT] += numregs;	\
  	 if (TARGET_SHCOMPACT				\
  	     && SHCOMPACT_FORCE_ON_STACK (MODE_, TYPE_)) \
! 	   {						\
! 	     (CUM).call_cookie 				\
! 	       |= CALL_COOKIE_INT_REG (((CUM).arg_count[(int) SH_ARG_INT] \
! 					- numregs), 1);	\
! 	     /* N.B. We want this also for outgoing.   */\
! 	     (CUM).stack_regs += numregs;		\
! 	   }						\
  	 else if ((CUM).byref)				\
  	   {						\
  	     if (! (CUM).outgoing)			\


More information about the Gcc-patches mailing list