This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
m68k PIC stuff
- To: egcs-patches at egcs dot cygnus dot com
- Subject: m68k PIC stuff
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 28 Jun 1999 06:11:17 -0600
- Reply-To: law at cygnus dot com
Don missed a couple things when he fixed the PIC register.
First he only fixed it in the SUN_FPA case. Opps.
Second, the register also needs to be marked as call_used.
The net result of these changes (as a whole) is to prevent the register
allocators and reload pass from using %a5 to hold other values (possibly
clobbering the GOT when we really needed it).
* m68k.h (CONDITIONAL_REGISTER_USAGE): Define for !SUN_FPA
case. Also make the PIC register call_used.
Index: m68k.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m68k/m68k.h,v
retrieving revision 1.35
diff -c -3 -p -r1.35 m68k.h
*** m68k.h 1999/06/28 04:39:42 1.35
--- m68k.h 1999/06/28 12:09:02
*************** extern int target_flags;
*** 457,463 ****
fixed_regs[i] = call_used_regs[i] = 1; \
} \
if (flag_pic) \
! fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1 \
}
#endif /* defined SUPPORT_SUN_FPA */
--- 457,471 ----
fixed_regs[i] = call_used_regs[i] = 1; \
} \
if (flag_pic) \
! fixed_regs[PIC_OFFSET_TABLE_REGNUM] \
! = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;\
! }
! #else
! #define CONDITIONAL_REGISTER_USAGE \
! { \
! if (flag_pic) \
! fixed_regs[PIC_OFFSET_TABLE_REGNUM] \
! = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;\
}
#endif /* defined SUPPORT_SUN_FPA */