diff options
author | iains <iains@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-02 14:40:03 +0000 |
---|---|---|
committer | iains <iains@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-02 14:40:03 +0000 |
commit | 90ff10b3d8a329ba3b765c9e64c885316eb7041f (patch) | |
tree | b5b577010dc10df43ec2cfd162565ca05edc0eb5 /gcc/config/darwin.h | |
parent | c9de603982077546ddeec49cb729f58719c1e25d (diff) | |
download | gcc-90ff10b3d8a329ba3b765c9e64c885316eb7041f.tar.gz |
update darwin x86 output.
gcc:
Merge from FSF "apple/trunk" branch.
* config/rs6000/darwin.opt (mdynamic-no-pic): move from here ...
* config/darwin.opt: .. to here.
(matt-stubs): New option.
* config/i386/darwin.opt: Delete.
* config/i386/i386.h (MACHOPIC_ATT_STUB): New.
(MACHO_DYNAMIC_NO_PIC_P): New.
(MACHOPIC_INDIRECT): New.
(MACHOPIC_PURE): New.
* config/i386/darwin.h (DARWIN_X86) Define to 1.
(MACHOPIC_ATT_STUB): New.
(CC1_SPEC): Do not remove mdynamic-no-pic.
Move HOT_TEXT_SECTION_NAME: move to config/darwin.h
UNLIKELY_EXECUTED_TEXT_SECTION_NAME: Likewise.
(FUNCTION_PROFILER): Correct over-length line.
(SUBTARGET_OVERRIDE_OPTIONS): New.
(MACHOPIC_NL_SYMBOL_PTR_SECTION): New.
* config/i386/i386.c (config/i386/i386.c): Darwin has no PLT.
(legitimate_constant_p): Handle mdynamic-no-pic.
(ix86_legitimate_address_p): Likewise.
(ix86_legitimize_address): Likewise.
(ix86_expand_move): Likewise.
(machopic_output_stub): Update for ATT-style stubs and
mdynamic-no-pic.
* config/darwin-protos.h (machopic_symbol_defined_p): New.
* config/rs6000/darwin.h (DARWIN_PPC): Define to 1.
TARGET_DYNAMIC_NO_PIC: Remove.
Move HOT_TEXT_SECTION_NAME: move to config/darwin.h
UNLIKELY_EXECUTED_TEXT_SECTION_NAME: Likewise.
* config/rs6000/rs6000.c (darwin_rs6000_override_options):
Remove handling of mdynamic-no-pic.
* config/darwin.c (HAVE_lo_sum, gen_macho_high, gen_macho_low):
Define if required.
(machopic_symbol_defined_p): Do not try to use current_function_decl
when generating _get_pc thunks within stubs.
(machopic_indirect_data_reference): Rework for direct conditionals
rather than #ifdefs, add x86 mdynamic-no-pic
(machopic_legitimize_pic_address): Update to use HAVE_lo_sum with a
defined value.
(darwin_override_options): Handle mdynamic-no-pic here.
* config/darwin-sections.def (machopic_lazy_symbol_ptr2_section): New.
(machopic_lazy_symbol_ptr3_section): New.
(machopic_picsymbol_stub2_section): New.
(machopic_picsymbol_stub3_section): New.
* config/darwin.h (DARWIN_X86, DARWIN_PPC): Define to 0.
(MACHOPIC_NL_SYMBOL_PTR_SECTION): New.
(HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME):
Moved common definition from x86 and rs6000.
(MACHO_DYNAMIC_NO_PIC_P): Override value.
(MACHOPIC_INDIRECT): Likewise.
(MACHOPIC_PURE): Likewise.
* config.gcc (x86-darwin-*): Remove darwin.opt.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/darwin.h')
-rw-r--r-- | gcc/config/darwin.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index c488db22103..438b7e03c4c 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -42,7 +42,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see like a.out and partly like COFF, with additional features like multi-architecture binary support. */ -#define OBJECT_FORMAT_MACHO +#define DARWIN_X86 0 +#define DARWIN_PPC 0 /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C @@ -720,6 +721,14 @@ int darwin_label_is_anonymous_local_objc_name (const char *name); #undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT (0x8000 * 8) +/* The generic version, archs should over-ride where required. */ +#define MACHOPIC_NL_SYMBOL_PTR_SECTION ".non_lazy_symbol_pointer" + +/* These are used by -fbranch-probabilities */ +#define HOT_TEXT_SECTION_NAME "__TEXT,__text,regular,pure_instructions" +#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME \ + "__TEXT,__unlikely,regular,pure_instructions" + /* Declare the section variables. */ #ifndef USED_FOR_TARGET enum darwin_section_enum { @@ -820,9 +829,12 @@ enum machopic_addr_class { /* Macros defining the various PIC cases. */ -#define MACHO_DYNAMIC_NO_PIC_P (TARGET_DYNAMIC_NO_PIC) +#undef MACHO_DYNAMIC_NO_PIC_P +#define MACHO_DYNAMIC_NO_PIC_P (TARGET_MACHO_DYNAMIC_NO_PIC) +#undef MACHOPIC_INDIRECT #define MACHOPIC_INDIRECT (flag_pic || MACHO_DYNAMIC_NO_PIC_P) #define MACHOPIC_JUST_INDIRECT (MACHO_DYNAMIC_NO_PIC_P) +#undef MACHOPIC_PURE #define MACHOPIC_PURE (flag_pic && ! MACHO_DYNAMIC_NO_PIC_P) #undef TARGET_ENCODE_SECTION_INFO |