egcs-1.1.1: Register save in sparc if -fpic and -mflat
Teemu Torma
tot@trema.com
Tue Jan 12 02:04:00 GMT 1999
I think that %l7 should be saved too in sparc if using both -fpic and
-mflat. Please correct me if I am wrong.
Teemu
Tue Jan 12 09:49:27 1999 Teemu Torma <tot@trema.com>
* config/sparc/sparc.c (MUST_SAVE_REGISTER): Must save register
PIC_OFFSET_TABLE_REGNUM if it is used.
Index: config/sparc/sparc.c
===================================================================
RCS file: /trema/cvs/gnu/egcs/gcc/config/sparc/sparc.c,v
retrieving revision 1.1.1.11
diff -c -r1.1.1.11 sparc.c
*** config/sparc/sparc.c 1998/07/16 10:21:01 1.1.1.11
--- config/sparc/sparc.c 1999/01/08 23:04:46
***************
*** 5519,5528 ****
#define FRAME_POINTER_MASK (1 << (FRAME_POINTER_REGNUM))
#define RETURN_ADDR_MASK (1 << (RETURN_ADDR_REGNUM))
! #define MUST_SAVE_REGISTER(regno) \
! ((regs_ever_live[regno] && !call_used_regs[regno]) \
! || (regno == FRAME_POINTER_REGNUM && frame_pointer_needed) \
! || (regno == RETURN_ADDR_REGNUM && regs_ever_live[RETURN_ADDR_REGNUM]))
/* Return the bytes needed to compute the frame pointer from the current
stack pointer. */
--- 5519,5530 ----
#define FRAME_POINTER_MASK (1 << (FRAME_POINTER_REGNUM))
#define RETURN_ADDR_MASK (1 << (RETURN_ADDR_REGNUM))
! #define MUST_SAVE_REGISTER(regno) \
! ((regs_ever_live[regno] && !call_used_regs[regno]) \
! || (regno == FRAME_POINTER_REGNUM && frame_pointer_needed) \
! || (regno == RETURN_ADDR_REGNUM && regs_ever_live[RETURN_ADDR_REGNUM]) \
! || (regno == PIC_OFFSET_TABLE_REGNUM \
! && current_function_uses_pic_offset_table))
/* Return the bytes needed to compute the frame pointer from the current
stack pointer. */
More information about the Gcc-patches
mailing list