Implement -mmemcpy-strategy= and -mmemset-strategy= options
[official-gcc.git] / gcc / config / i386 / sol2-bi.h
blob22c972b801f3c017dd1aaf5d448b441ec65ac5ca
1 /* Definitions of target machine for GCC, for bi-arch Solaris 2/x86.
2 Copyright (C) 2004-2013 Free Software Foundation, Inc.
3 Contributed by CodeSourcery, LLC.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 /* Override i386/sol2.h version: return 8-byte vectors in MMX registers if
22 possible, matching Sun Studio 12 Update 1+ compilers and other x86
23 targets. */
24 #undef TARGET_SUBTARGET_DEFAULT
25 #define TARGET_SUBTARGET_DEFAULT \
26 (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS)
28 #define SUBTARGET_OPTIMIZATION_OPTIONS \
29 { OPT_LEVELS_1_PLUS, OPT_momit_leaf_frame_pointer, NULL, 1 }
31 /* GNU as understands --32 and --64, but the native Solaris
32 assembler requires -xarch=generic or -xarch=generic64 instead. */
33 #ifdef USE_GAS
34 #define ASM_CPU32_DEFAULT_SPEC "--32"
35 #define ASM_CPU64_DEFAULT_SPEC "--64"
36 #else
37 #define ASM_CPU32_DEFAULT_SPEC "-xarch=generic"
38 #define ASM_CPU64_DEFAULT_SPEC "-xarch=generic64"
39 #endif
41 #undef ASM_CPU_SPEC
42 #define ASM_CPU_SPEC "%(asm_cpu_default)"
44 /* Don't let i386/x86-64.h override i386/sol2.h version. Still cannot use
45 -K PIC with the Solaris 10+ assembler, it gives many warnings:
46 Absolute relocation is used for symbol "<symbol>" */
47 #undef ASM_SPEC
48 #define ASM_SPEC ASM_SPEC_BASE
50 /* We do not need to search a special directory for startup files. */
51 #undef MD_STARTFILE_PREFIX
53 #define DEFAULT_ARCH32_P !TARGET_64BIT_DEFAULT
55 #define ARCH64_SUBDIR "amd64"
57 #ifdef USE_GLD
58 /* Since binutils 2.21, GNU ld supports new *_sol2 emulations to strictly
59 follow the Solaris 2 ABI. Prefer them if present. */
60 #ifdef HAVE_LD_SOL2_EMULATION
61 #define ARCH32_EMULATION "elf_i386_sol2"
62 #define ARCH64_EMULATION "elf_x86_64_sol2"
63 #else
64 #define ARCH32_EMULATION "elf_i386"
65 #define ARCH64_EMULATION "elf_x86_64"
66 #endif
67 #endif
69 #undef ASM_COMMENT_START
70 #define ASM_COMMENT_START "/"
72 /* The native Solaris assembler can't calculate the difference between
73 symbols in different sections, which causes problems for -fPIC jump
74 tables in .rodata. */
75 #ifndef HAVE_AS_IX86_DIFF_SECT_DELTA
76 #undef JUMP_TABLES_IN_TEXT_SECTION
77 #define JUMP_TABLES_IN_TEXT_SECTION 1
79 /* The native Solaris assembler cannot handle the SYMBOL-. syntax, but
80 requires SYMBOL@rel/@rel64 instead. */
81 #define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL) \
82 do { \
83 fputs (integer_asm_op (SIZE, FALSE), FILE); \
84 assemble_name (FILE, LABEL); \
85 fputs (SIZE == 8 ? "@rel64" : "@rel", FILE); \
86 } while (0)
87 #endif
89 /* As in sol2.h, override the default from i386/x86-64.h to work around
90 Sun as TLS bug. */
91 #undef ASM_OUTPUT_ALIGNED_COMMON
92 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
93 do \
94 { \
95 if (TARGET_SUN_TLS \
96 && in_section \
97 && ((in_section->common.flags & SECTION_TLS) == SECTION_TLS)) \
98 switch_to_section (bss_section); \
99 x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN); \
101 while (0)
103 #define USE_IX86_FRAME_POINTER 1
104 #define USE_X86_64_FRAME_POINTER 1
106 #undef NO_PROFILE_COUNTERS
108 #undef MCOUNT_NAME
109 #define MCOUNT_NAME "_mcount"