diff options
Diffstat (limited to 'gcc/config/arm/arm.c')
| -rw-r--r-- | gcc/config/arm/arm.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 0edba77..aeb0e53 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3659,8 +3659,7 @@ static GTY(()) int pic_labelno; void arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED) { - rtx l1, labelno, pic_tmp, pic_tmp2, pic_rtx, pic_reg; - rtx global_offset_table; + rtx l1, labelno, pic_tmp, pic_rtx, pic_reg; if (crtl->uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE) return; @@ -3688,20 +3687,11 @@ arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED) l1 = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, labelno), UNSPEC_PIC_LABEL); l1 = gen_rtx_CONST (VOIDmode, l1); - global_offset_table - = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); /* On the ARM the PC register contains 'dot + 8' at the time of the addition, on the Thumb it is 'dot + 4'. */ - pic_tmp = plus_constant (l1, TARGET_ARM ? 8 : 4); - if (GOT_PCREL) - { - pic_tmp2 = gen_rtx_PLUS (Pmode, global_offset_table, pc_rtx); - pic_tmp2 = gen_rtx_CONST (VOIDmode, pic_tmp2); - } - else - pic_tmp2 = gen_rtx_CONST (VOIDmode, global_offset_table); - - pic_rtx = gen_rtx_MINUS (Pmode, pic_tmp2, pic_tmp); + pic_rtx = plus_constant (l1, TARGET_ARM ? 8 : 4); + pic_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, pic_rtx), + UNSPEC_GOTSYM_OFF); pic_rtx = gen_rtx_CONST (Pmode, pic_rtx); if (TARGET_ARM) @@ -18996,6 +18986,16 @@ arm_output_addr_const_extra (FILE *fp, rtx x) return TRUE; } + else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_GOTSYM_OFF) + { + assemble_name (fp, "_GLOBAL_OFFSET_TABLE_"); + if (GOT_PCREL) + fputs ("+.", fp); + fputs ("-(", fp); + output_addr_const (fp, XVECEXP (x, 0, 0)); + fputc (')', fp); + return TRUE; + } else if (GET_CODE (x) == CONST_VECTOR) return arm_emit_vector_const (fp, x); |
