0
|
1 /* Definitions of target machine for GCC, for SPARC64, ELF.
|
|
2 Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2004, 2005, 2007
|
|
3 Free Software Foundation, Inc.
|
|
4 Contributed by Doug Evans, dje@cygnus.com.
|
|
5
|
|
6 This file is part of GCC.
|
|
7
|
|
8 GCC is free software; you can redistribute it and/or modify
|
|
9 it under the terms of the GNU General Public License as published by
|
|
10 the Free Software Foundation; either version 3, or (at your option)
|
|
11 any later version.
|
|
12
|
|
13 GCC is distributed in the hope that it will be useful,
|
|
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 GNU General Public License for more details.
|
|
17
|
|
18 You should have received a copy of the GNU General Public License
|
|
19 along with GCC; see the file COPYING3. If not see
|
|
20 <http://www.gnu.org/licenses/>. */
|
|
21
|
|
22 #undef TARGET_VERSION
|
|
23 #define TARGET_VERSION fprintf (stderr, " (sparc64-elf)")
|
|
24
|
|
25 /* A 64 bit v9 compiler in a Medium/Anywhere code model environment. */
|
|
26 #undef TARGET_DEFAULT
|
|
27 #define TARGET_DEFAULT \
|
|
28 (MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
|
|
29 + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
|
|
30
|
|
31 #undef SPARC_DEFAULT_CMODEL
|
|
32 #define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
|
|
33
|
|
34 /* Don't assume anything about the header files. */
|
|
35 #define NO_IMPLICIT_EXTERN_C
|
|
36
|
|
37 /* __svr4__ is used by the C library (FIXME) */
|
|
38 #undef CPP_SUBTARGET_SPEC
|
|
39 #define CPP_SUBTARGET_SPEC "-D__svr4__"
|
|
40
|
|
41 #undef MD_EXEC_PREFIX
|
|
42 #undef MD_STARTFILE_PREFIX
|
|
43
|
|
44 #undef ASM_SPEC
|
|
45 #define ASM_SPEC "\
|
|
46 %{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
|
|
47 %{mlittle-endian:-EL} \
|
|
48 %(asm_cpu) %(asm_arch) \
|
|
49 "
|
|
50
|
|
51 /* This is taken from sol2.h. */
|
|
52 #undef LINK_SPEC
|
|
53 #define LINK_SPEC "\
|
|
54 %{v:-V} \
|
|
55 %{mlittle-endian:-EL} \
|
|
56 "
|
|
57
|
|
58 /* We need something a little simpler for the embedded environment.
|
|
59 Profiling doesn't really work yet so we just copy the default. */
|
|
60 #undef STARTFILE_SPEC
|
|
61 #define STARTFILE_SPEC "\
|
|
62 %{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} \
|
|
63 crtbegin.o%s \
|
|
64 "
|
|
65
|
|
66 #undef ENDFILE_SPEC
|
|
67 #define ENDFILE_SPEC \
|
|
68 "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
|
|
69 crtend.o%s"
|
|
70
|
|
71 /* Use the default (for now). */
|
|
72 #undef LIB_SPEC
|
|
73
|
|
74 /* This defines which switch letters take arguments.
|
|
75 It is as in svr4.h but with -R added. */
|
|
76 #undef SWITCH_TAKES_ARG
|
|
77 #define SWITCH_TAKES_ARG(CHAR) \
|
|
78 (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
|
|
79 || (CHAR) == 'R' \
|
|
80 || (CHAR) == 'h' \
|
|
81 || (CHAR) == 'z')
|
|
82
|
|
83 #undef BYTES_BIG_ENDIAN
|
|
84 #define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
|
|
85
|
|
86 #undef WORDS_BIG_ENDIAN
|
|
87 #define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
|
|
88
|
|
89 #undef LOCAL_LABEL_PREFIX
|
|
90 #define LOCAL_LABEL_PREFIX "."
|
|
91
|
|
92 /* This is how to store into the string LABEL
|
|
93 the symbol_ref name of an internal numbered label where
|
|
94 PREFIX is the class of label and NUM is the number within the class.
|
|
95 This is suitable for output with `assemble_name'. */
|
|
96
|
|
97 #undef ASM_GENERATE_INTERNAL_LABEL
|
|
98 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
|
|
99 sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
|
|
100
|
|
101 /* ??? This should be 32 bits for v9 but what can we do? */
|
|
102 #undef WCHAR_TYPE
|
|
103 #define WCHAR_TYPE "short unsigned int"
|
|
104
|
|
105 #undef WCHAR_TYPE_SIZE
|
|
106 #define WCHAR_TYPE_SIZE 16
|
|
107
|
|
108 #undef LONG_DOUBLE_TYPE_SIZE
|
|
109 #define LONG_DOUBLE_TYPE_SIZE 128
|