Leaving this as r30 results in pic_offset_table_rtx of (reg 30)
for -m64, which is completely bogus. Various rtl analysis predicate
functions treat pic_offset_table_rtx specially..
* config/rs6000/rs6000.h (PIC_OFFSET_TABLE_REGNUM): Correct.
From-SVN: r235876
2016-05-04 Alan Modra <amodra@gmail.com>
+ * config/rs6000/rs6000.h (PIC_OFFSET_TABLE_REGNUM): Correct.
* config/rs6000/sysv4.h (TARGET_TOC): Simplify.
* config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op):
Align .toc.
to allocate such a register (if necessary). */
#define RS6000_PIC_OFFSET_TABLE_REGNUM 30
-#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? RS6000_PIC_OFFSET_TABLE_REGNUM : INVALID_REGNUM)
+#define PIC_OFFSET_TABLE_REGNUM \
+ (TARGET_TOC ? TOC_REGISTER \
+ : flag_pic ? RS6000_PIC_OFFSET_TABLE_REGNUM \
+ : INVALID_REGNUM)
#define TOC_REGISTER (TARGET_MINIMAL_TOC ? RS6000_PIC_OFFSET_TABLE_REGNUM : 2)