@@ -24118,13 +24118,13 @@ rs6000_emit_prologue (void)
#define NOT_INUSE(R) do {} while (0)
#endif
- if (DEFAULT_ABI == ABI_ELFv2)
+ if (DEFAULT_ABI == ABI_ELFv2
+ && !TARGET_SINGLE_PIC_BASE)
{
cfun->machine->r2_setup_needed = df_regs_ever_live_p (TOC_REGNUM);
/* With -mminimal-toc we may generate an extra use of r2 below. */
- if (!TARGET_SINGLE_PIC_BASE
- && TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
+ if (TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
cfun->machine->r2_setup_needed = true;
}
@@ -26800,7 +26800,8 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Ensure we have a global entry point for the thunk. ??? We could
avoid that if the target routine doesn't need a global entry point,
but we do not know whether this is the case at this point. */
- if (DEFAULT_ABI == ABI_ELFv2)
+ if (DEFAULT_ABI == ABI_ELFv2
+ && !TARGET_SINGLE_PIC_BASE)
cfun->machine->r2_setup_needed = true;
/* Run just enough of rest_of_compilation to get the insns emitted.