/* The second flow pass currently (June 1999) can't update
regs_ever_live without disturbing other parts of the compiler, so
update it here to make the prolog/epilogue code happy. */
- if (no_new_pseudos && ! regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
- regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1;
+ if (no_new_pseudos && ! regs_ever_live[RS6000_PIC_OFFSET_TABLE_REGNUM])
+ regs_ever_live[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1;
current_function_uses_pic_offset_table = 1;
for (first_reg = 13; first_reg <= 31; first_reg++)
if (regs_ever_live[first_reg]
&& (! call_used_regs[first_reg]
- || (first_reg == PIC_OFFSET_TABLE_REGNUM
+ || (first_reg == RS6000_PIC_OFFSET_TABLE_REGNUM
&& ((DEFAULT_ABI == ABI_V4 && flag_pic == 1)
|| (DEFAULT_ABI == ABI_DARWIN && flag_pic)))))
break;
#if TARGET_MACHO
if (flag_pic && current_function_uses_pic_offset_table &&
- (first_reg > PIC_OFFSET_TABLE_REGNUM))
- return PIC_OFFSET_TABLE_REGNUM;
+ (first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM))
+ return RS6000_PIC_OFFSET_TABLE_REGNUM;
#endif
return first_reg;
/* Calculate which registers need to be saved & save area size. */
info_ptr->first_gp_reg_save = first_reg_to_save ();
- /* Assume that we will have to save PIC_OFFSET_TABLE_REGNUM,
+ /* Assume that we will have to save RS6000_PIC_OFFSET_TABLE_REGNUM,
even if it currently looks like we won't. */
if (((TARGET_TOC && TARGET_MINIMAL_TOC)
|| (flag_pic == 1 && abi == ABI_V4)
|| (flag_pic && abi == ABI_DARWIN))
- && info_ptr->first_gp_reg_save > PIC_OFFSET_TABLE_REGNUM)
- info_ptr->gp_size = reg_size * (32 - PIC_OFFSET_TABLE_REGNUM);
+ && info_ptr->first_gp_reg_save > RS6000_PIC_OFFSET_TABLE_REGNUM)
+ info_ptr->gp_size = reg_size * (32 - RS6000_PIC_OFFSET_TABLE_REGNUM);
else
info_ptr->gp_size = reg_size * (32 - info_ptr->first_gp_reg_save);
int fromprolog;
{
rtx dest;
- dest = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM);
+ dest = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM);
if (TARGET_ELF && DEFAULT_ABI != ABI_AIX)
{
for (i = 0; i < 32 - info->first_gp_reg_save; i++)
if ((regs_ever_live[info->first_gp_reg_save+i]
&& ! call_used_regs[info->first_gp_reg_save+i])
- || (i+info->first_gp_reg_save == PIC_OFFSET_TABLE_REGNUM
+ || (i+info->first_gp_reg_save == RS6000_PIC_OFFSET_TABLE_REGNUM
&& ((DEFAULT_ABI == ABI_V4 && flag_pic == 1)
|| (DEFAULT_ABI == ABI_DARWIN && flag_pic))))
{
RTX_FRAME_RELATED_P (insn) = 1;
}
- /* If we are using PIC_OFFSET_TABLE_REGNUM, we need to set it up. */
+ /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */
if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
|| (DEFAULT_ABI == ABI_V4 && flag_pic == 1
- && regs_ever_live[PIC_OFFSET_TABLE_REGNUM]))
+ && regs_ever_live[RS6000_PIC_OFFSET_TABLE_REGNUM]))
{
/* If emit_load_toc_table will use the link register, we need to save
it. We use R11 for this purpose because emit_load_toc_table
rs6000_maybe_dead (emit_insn (gen_load_macho_picbase (dest)));
rs6000_maybe_dead (
- emit_move_insn (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM),
+ emit_move_insn (gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM),
gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM)));
}
}
for (i = 0; i < 32 - info->first_gp_reg_save; i++)
if ((regs_ever_live[info->first_gp_reg_save+i]
&& ! call_used_regs[info->first_gp_reg_save+i])
- || (i+info->first_gp_reg_save == PIC_OFFSET_TABLE_REGNUM
+ || (i+info->first_gp_reg_save == RS6000_PIC_OFFSET_TABLE_REGNUM
&& ((DEFAULT_ABI == ABI_V4 && flag_pic == 1)
|| (DEFAULT_ABI == ABI_DARWIN && flag_pic))))
{
for (i = 32; i < 64; i++) \
fixed_regs[i] = call_used_regs[i] \
= call_really_used_regs[i] = 1; \
- if (DEFAULT_ABI == ABI_V4 && flag_pic == 1) \
- fixed_regs[PIC_OFFSET_TABLE_REGNUM] \
- = call_used_regs[PIC_OFFSET_TABLE_REGNUM] \
- = call_really_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- if (DEFAULT_ABI == ABI_DARWIN && flag_pic) \
- global_regs[PIC_OFFSET_TABLE_REGNUM] \
- = fixed_regs[PIC_OFFSET_TABLE_REGNUM] \
- = call_used_regs[PIC_OFFSET_TABLE_REGNUM] \
- = call_really_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
+ if (DEFAULT_ABI == ABI_V4 \
+ && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM \
+ && flag_pic == 1) \
+ fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \
+ = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \
+ = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1; \
+ if (DEFAULT_ABI == ABI_DARWIN \
+ && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) \
+ global_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \
+ = fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \
+ = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \
+ = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1; \
if (! TARGET_ALTIVEC) \
{ \
for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i) \
this macro is not defined, it is up to the machine-dependent files
to allocate such a register (if necessary). */
-#define PIC_OFFSET_TABLE_REGNUM 30
+#define RS6000_PIC_OFFSET_TABLE_REGNUM 30
+#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? RS6000_PIC_OFFSET_TABLE_REGNUM : INVALID_REGNUM)
#define TOC_REGISTER (TARGET_MINIMAL_TOC ? 30 : 2)