diff options
Diffstat (limited to 'gcc/config/i386/darwin.h')
-rw-r--r-- | gcc/config/i386/darwin.h | 55 |
1 files changed, 52 insertions, 3 deletions
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index accffeee90c..0212184c3fb 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -23,7 +23,13 @@ Boston, MA 02111-1307, USA. */ #undef TARGET_MACHO #define TARGET_MACHO 1 -#define TARGET_VERSION fprintf (stderr, " (i686 Darwin)"); +/* APPLE LOCAL begin default to ppro */ +/* Default to -mcpu=pentiumpro instead of i386 (radar 2730299) ilr */ +#undef TARGET_CPU_DEFAULT +#define TARGET_CPU_DEFAULT 4 +/* APPLE LOCAL end default to ppro */ + +#define TARGET_VERSION fprintf (stderr, " (i386 Darwin)"); #define TARGET_OS_CPP_BUILTINS() \ do \ @@ -39,7 +45,13 @@ Boston, MA 02111-1307, USA. */ the kernel or some such. */ #undef CC1_SPEC -#define CC1_SPEC "%{!static:-fPIC}" +/* APPLE LOCAL dynamic-no-pic */ +/* APPLE LOCAL ignore -mcpu=G4 -mcpu=G5 */ +/* When -mdynamic-no-pic finally works, remove the "xx" below. FIXME!! */ +#define CC1_SPEC "%{!static:%{!mxxdynamic-no-pic:-fPIC}} %<faltivec %<mlong-branch %<mlongcall %<mcpu=G4 %<mcpu=G5" + +/* APPLE LOCAL AltiVec */ +#define CPP_ALTIVEC_SPEC "%<faltivec" #define ASM_SPEC "-arch i686 \ -force_cpusubtype_ALL \ @@ -104,7 +116,12 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_ALIGN(FILE,LOG) \ do { if ((LOG) != 0) \ { \ - if (in_text_section ()) \ + /* APPLE LOCAL coalescing */ \ + if (in_text_section () \ + || in_unlikely_text_section () \ + || darwin_named_section_is ("__TEXT,__textcoal,coalesced") \ + || darwin_named_section_is ("__TEXT,__textcoal_nt,coalesced,no_toc") \ + || darwin_named_section_is (STATIC_INIT_SECTION)) \ fprintf (FILE, "\t%s %d,0x90\n", ALIGN_ASM_OP, (LOG)); \ else \ fprintf (FILE, "\t%s %d\n", ALIGN_ASM_OP, (LOG)); \ @@ -127,6 +144,27 @@ Boston, MA 02111-1307, USA. */ assemble_name ((FILE), (NAME)), \ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (ROUNDED))) + +/* APPLE LOCAL begin Macintosh alignment 2002-2-19 ff */ +#define MASK_ALIGN_NATURAL 0x40000000 +#define TARGET_ALIGN_NATURAL (target_flags & MASK_ALIGN_NATURAL) +#define rs6000_alignment_flags target_flags +#define MASK_ALIGN_MAC68K 0x20000000 +#define TARGET_ALIGN_MAC68K (target_flags & MASK_ALIGN_MAC68K) + +#undef SUBTARGET_SWITCHES +#define SUBTARGET_SWITCHES \ + {"align-mac68k", MASK_ALIGN_MAC68K, \ + N_("Align structs and unions according to mac68k rules")}, \ + {"align-power", - (MASK_ALIGN_MAC68K | MASK_ALIGN_NATURAL), \ + N_("Align structs and unions according to PowerPC rules")}, \ + {"align-natural", MASK_ALIGN_NATURAL, \ + N_("Align structs and unions according to natural rules")}, \ + {"dynamic-no-pic", MASK_MACHO_DYNAMIC_NO_PIC, \ + N_("Generate code suitable for executables (NOT shared libs)")},\ + {"no-dynamic-no-pic", -MASK_MACHO_DYNAMIC_NO_PIC, ""}, +/* APPLE LOCAL end Macintosh alignment 2002-2-19 ff */ + /* Darwin profiling -- call mcount. */ #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(FILE, LABELNO) \ @@ -139,3 +177,14 @@ Boston, MA 02111-1307, USA. */ } \ else fprintf (FILE, "\tcall mcount\n"); \ } while (0) + +/* APPLE LOCAL SSE stack alignment */ +#define BASIC_STACK_BOUNDARY (128) + +#undef SUBTARGET_OVERRIDE_OPTIONS +/* Force Darwin/x86 to default as "-march=i686 -mcpu=pentium4". */ +#define SUBTARGET_OVERRIDE_OPTIONS \ + do { \ + if (!ix86_arch_string) ix86_arch_string = "pentiumpro"; \ + if (!ix86_tune_string) ix86_tune_string = "pentium4"; \ + } while (0) |