]>
Commit | Line | Data |
---|---|---|
de0a398e | 1 | /* Definitions of target machine for GCC, for SPARC running Solaris 2 |
3fc602a0 RH |
2 | Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 |
3 | Free Software Foundation, Inc. | |
7d4ea832 | 4 | Contributed by Ron Guilmette (rfg@netcom.com). |
ed1817c6 | 5 | Additional changes by David V. Henkel-Wallace (gumby@cygnus.com). |
4ab76dcd | 6 | |
de0a398e | 7 | This file is part of GCC. |
4ab76dcd | 8 | |
de0a398e | 9 | GCC is free software; you can redistribute it and/or modify |
4ab76dcd RK |
10 | it under the terms of the GNU General Public License as published by |
11 | the Free Software Foundation; either version 2, or (at your option) | |
12 | any later version. | |
13 | ||
de0a398e | 14 | GCC is distributed in the hope that it will be useful, |
4ab76dcd RK |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
de0a398e | 20 | along with GCC; see the file COPYING. If not, write to |
c15c9075 RK |
21 | the Free Software Foundation, 59 Temple Place - Suite 330, |
22 | Boston, MA 02111-1307, USA. */ | |
4ab76dcd | 23 | |
8f3d7f00 | 24 | /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */ |
4ab76dcd | 25 | |
cbe16f8a DE |
26 | /* This is here rather than in sparc.h because it's not known what |
27 | other assemblers will accept. */ | |
b7764693 | 28 | |
a0a301fc DE |
29 | #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 |
30 | #undef ASM_CPU_DEFAULT_SPEC | |
31 | #define ASM_CPU_DEFAULT_SPEC "-xarch=v8plus" | |
32 | #endif | |
b7764693 | 33 | |
a0a301fc DE |
34 | #if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc |
35 | #undef ASM_CPU_DEFAULT_SPEC | |
36 | #define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusa" | |
cbe16f8a | 37 | #endif |
b7764693 | 38 | |
cbe16f8a DE |
39 | #undef ASM_CPU_SPEC |
40 | #define ASM_CPU_SPEC "\ | |
11779f27 | 41 | %{mcpu=v8plus:-xarch=v8plus} \ |
b7764693 | 42 | %{mcpu=v9:-xarch=v8plus} \ |
a0a301fc DE |
43 | %{mcpu=ultrasparc:-xarch=v8plusa} \ |
44 | %{!mcpu*:%(asm_cpu_default)} \ | |
cbe16f8a | 45 | " |
8f3d7f00 | 46 | |
be3a0ce2 RO |
47 | #undef SUBTARGET_EXTRA_SPECS |
48 | #define SUBTARGET_EXTRA_SPECS \ | |
49 | { "startfile_arch", STARTFILE_ARCH_SPEC }, \ | |
50 | { "link_arch", LINK_ARCH_SPEC } | |
51 | ||
8f3d7f00 | 52 | /* However it appears that Solaris 2.0 uses the same reg numbering as |
80ffc95e | 53 | the old BSD-style system did. */ |
8f3d7f00 | 54 | |
8f3d7f00 | 55 | /* Same as sparc.h */ |
3fc602a0 | 56 | #undef DBX_REGISTER_NUMBER |
c53aa195 | 57 | #define DBX_REGISTER_NUMBER(REGNO) \ |
563c12b0 | 58 | (TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO) |
8f3d7f00 | 59 | |
80ffc95e | 60 | /* The Solaris 2 assembler uses .skip, not .zero, so put this back. */ |
8f3d7f00 RS |
61 | #undef ASM_OUTPUT_SKIP |
62 | #define ASM_OUTPUT_SKIP(FILE,SIZE) \ | |
58e15542 | 63 | fprintf (FILE, "\t.skip %u\n", (int)(SIZE)) |
8f3d7f00 | 64 | |
59f96879 RH |
65 | #undef LOCAL_LABEL_PREFIX |
66 | #define LOCAL_LABEL_PREFIX "." | |
67 | ||
8f3d7f00 RS |
68 | /* This is how to output a reference to an internal numbered label where |
69 | PREFIX is the class of label and NUM is the number within the class. */ | |
70 | ||
71 | #undef ASM_OUTPUT_INTERNAL_LABELREF | |
72 | #define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM) \ | |
73 | fprintf (FILE, ".L%s%d", PREFIX, NUM) | |
74 | ||
75 | /* This is how to store into the string LABEL | |
76 | the symbol_ref name of an internal numbered label where | |
77 | PREFIX is the class of label and NUM is the number within the class. | |
78 | This is suitable for output with `assemble_name'. */ | |
79 | ||
80 | #undef ASM_GENERATE_INTERNAL_LABEL | |
81 | #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ | |
4f70758f | 82 | sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM)) |
8f3d7f00 | 83 | |
2f3321ca EB |
84 | /* The native TLS-enabled assembler requires the directive #tls_object |
85 | to be put on objects in TLS sections (as of v7.1). This is not | |
86 | required by the GNU assembler but supported on SPARC. */ | |
87 | #undef ASM_DECLARE_OBJECT_NAME | |
88 | #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ | |
89 | do \ | |
90 | { \ | |
91 | HOST_WIDE_INT size; \ | |
92 | \ | |
93 | if (DECL_THREAD_LOCAL (DECL)) \ | |
94 | ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "tls_object"); \ | |
95 | else \ | |
96 | ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ | |
97 | \ | |
98 | size_directive_output = 0; \ | |
99 | if (!flag_inhibit_size_directive \ | |
100 | && (DECL) && DECL_SIZE (DECL)) \ | |
101 | { \ | |
102 | size_directive_output = 1; \ | |
103 | size = int_size_in_bytes (TREE_TYPE (DECL)); \ | |
104 | ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ | |
105 | } \ | |
106 | \ | |
107 | ASM_OUTPUT_LABEL (FILE, NAME); \ | |
108 | } \ | |
109 | while (0) | |
110 | ||
8f3d7f00 | 111 | \f |
68d69835 JM |
112 | |
113 | #undef ENDFILE_SPEC | |
a261e0cc DM |
114 | #define ENDFILE_SPEC \ |
115 | "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ | |
116 | crtend.o%s crtn.o%s" | |
6f13015b | 117 | |
17e9e88c JJ |
118 | /* Select a format to encode pointers in exception handling data. CODE |
119 | is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is | |
120 | true if the symbol may be affected by dynamic relocations. | |
121 | ||
122 | Some Solaris dynamic linkers don't handle unaligned section relative | |
123 | relocs properly, so force them to be aligned. */ | |
124 | #ifndef HAVE_AS_SPARC_UA_PCREL | |
125 | #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ | |
126 | ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr) | |
127 | #endif | |
9684a840 EB |
128 | |
129 | /* The Solaris linker doesn't understand constructor priorities. */ | |
130 | #undef SUPPORTS_INIT_PRIORITY | |
131 | #define SUPPORTS_INIT_PRIORITY 0 | |
05710c13 JW |
132 | \f |
133 | /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h. | |
134 | Instead, it is enabled here, because it does work under Solaris. */ | |
ba31d94e | 135 | /* Define for support of TFmode long double. |
56149abc | 136 | SPARC ABI says that long double is 4 words. */ |
05710c13 | 137 | #define LONG_DOUBLE_TYPE_SIZE 128 |
e9a25f70 JL |
138 | |
139 | /* But indicate that it isn't supported by the hardware. */ | |
140 | #define WIDEST_HARDWARE_FP_SIZE 64 | |
141 | ||
4e7d5d27 DM |
142 | /* Solaris's _Qp_* library routine implementation clobbers the output |
143 | memory before the inputs are fully consumed. */ | |
144 | ||
145 | #undef TARGET_BUGGY_QP_LIB | |
146 | #define TARGET_BUGGY_QP_LIB 1 | |
147 | ||
c15c90bb ZW |
148 | #undef SOLARIS_CONVERSION_LIBFUNCS |
149 | #define SOLARIS_CONVERSION_LIBFUNCS 1 | |
150 | ||
151 | #undef SUN_INTEGER_MULTIPLY_64 | |
152 | #define SUN_INTEGER_MULTIPLY_64 1 | |
cb9e12a7 | 153 | |
284d86e9 JC |
154 | /* Solaris allows 64 bit out and global registers in 32 bit mode. |
155 | sparc_override_options will disable V8+ if not generating V9 code. */ | |
156 | #undef TARGET_DEFAULT | |
8433a25e | 157 | #define TARGET_DEFAULT (MASK_V8PLUS + MASK_FPU + MASK_LONG_DOUBLE_128) |