This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, arm] Naked funcs are only half naked on Thumb


Hi,

The following patch makes sure that the epilogue is not generated for
naked Thumb functions.

The patch was regtested on arm-elf with -mthumb.

Please apply if OK.
Adam

2002-08-18  Adam Nemet  <anemet@lnxw.com>

	* config/arm/arm.c (thumb_unexpanded_epilogue): Don't generate
	epilogue for naked functions.

Index: arm.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.221
diff -c -p -r1.221 arm.c
*** arm.c	11 Aug 2002 18:48:50 -0000	1.221
--- arm.c	19 Aug 2002 06:46:04 -0000
*************** thumb_unexpanded_epilogue ()
*** 9916,9921 ****
--- 9916,9924 ----
    if (return_used_this_function)
      return "";
  
+   if (IS_NAKED (arm_current_func_type ()))
+     return "";
+ 
    for (regno = 0; regno <= LAST_LO_REGNUM; regno++)
      if (THUMB_REG_PUSHED_P (regno))
        live_regs_mask |= 1 << regno;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]