diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2008-10-06 19:07:33 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2008-10-06 19:07:33 +0000 |
commit | 08a6a74b917d3a7b0070c264374cd076edfacc9e (patch) | |
tree | dd906add3e83a4a7cf219604bf1100b0f5173d20 /gcc/config/rs6000/rs6000.md | |
parent | 2e4316da802a3049f67686001f9dbca5711dcace (diff) | |
download | gcc-08a6a74b917d3a7b0070c264374cd076edfacc9e.zip gcc-08a6a74b917d3a7b0070c264374cd076edfacc9e.tar.gz gcc-08a6a74b917d3a7b0070c264374cd076edfacc9e.tar.bz2 |
darwin-protos.h (machopic_function_base_name): Delete.
gcc/
* config/darwin-protos.h (machopic_function_base_name): Delete.
(machopic_function_base_sym): Likewise.
(machopic_gen_offset): Declare.
* config/darwin.h (MACHOPIC_FUNCTION_BASE_NAME): New macro.
(ASM_OUTPUT_LABELREF): Use it instead of a hard-coded string constant.
* config/darwin.c (machopic_function_base_name): Delete.
(machopic_function_base_sym): Likewise.
(gen_pic_offset): Rename to...
(machopic_gen_offset): ...this and remove the pic_base argument.
Instead use MACHO_DYNAMIC_NO_PIC_P to decide whether a PIC offset
is needed. Create an UNSPEC_MACHOPIC_OFFSET if so, and set
crtl->uses_pic_offset_table.
(machopic_indirect_data_reference): Use new machopic_gen_offset
interface.
(machopic_legitimize_pic_address): Likewise.
(machopic_operand_p): Check for UNSPEC_MACHOPIC_OFFSET.
* config/i386/darwin.h (GOT_SYMBOL_NAME): Use
MACHOPIC_FUNCTION_BASE_NAME instead of machopic_function_base_name.
* config/i386/i386.c (output_set_got): Likewise.
(darwin_local_data_pic): Check for an UNSPEC_MACHOPIC_OFFSET
instead of a MINUS.
(legitimate_pic_operand_p): Handle UNSPEC_MACHOPIC_OFFSET.
(legitimate_address_p): Likewise.
(output_pic_addr_const): Likewise.
(output_addr_const_extra): Likewise.
(ix86_delegitimize_address): Expect darwin_local_data_pic to
match an UNSPEC rather than a MINUS.
* config/i386/i386.md (UNSPEC_MACHOPIC_OFFSET): Define.
(builtin_setjmp_receiver): Use machopic_gen_offset.
* config/i386/predicates.md (pic_symbolic_operand): Handle
UNSPEC_MACHOPIC_OFFSET.
* config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
Use machopic_gen_offset and machopic_operand_p.
(rs6000_output_addr_const_extra): Handle UNSPEC_MACHOPIC_OFFSET.
(rs6000_emit_prologue): Use MACHOPIC_FUNCTION_BASE_NAME.
* config/rs6000/rs6000.md (UNSPEC_MACHOPIC_OFFSET): Define.
(builtin_setjmp_receiver): Use MACHOPIC_FUNCTION_BASE_NAME.
Set crtl->uses_pic_offset_table.
From-SVN: r140911
Diffstat (limited to 'gcc/config/rs6000/rs6000.md')
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 4146c4f..044b117 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -100,6 +100,7 @@ (UNSPEC_DLMZB_STRLEN 47) (UNSPEC_RSQRT 48) (UNSPEC_TOCREL 49) + (UNSPEC_MACHOPIC_OFFSET 50) ]) ;; @@ -10594,12 +10595,12 @@ #if TARGET_MACHO if (DEFAULT_ABI == ABI_DARWIN) { - const char *picbase = machopic_function_base_name (); - rtx picrtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (picbase)); + rtx picrtx = gen_rtx_SYMBOL_REF (Pmode, MACHOPIC_FUNCTION_BASE_NAME); rtx picreg = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM); rtx tmplabrtx; char tmplab[20]; + crtl->uses_pic_offset_table = 1; ASM_GENERATE_INTERNAL_LABEL(tmplab, \"LSJR\", CODE_LABEL_NUMBER (operands[0])); tmplabrtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (tmplab)); |