1 /* Definitions of target machine for GCC, for SPARC64, ELF.
2 Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2004, 2005
3 Free Software Foundation, Inc.
4 Contributed by Doug Evans, dje@cygnus.com.
6 This file is part of GCC.
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 2, or (at your option)
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.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
24 #define TARGET_VERSION fprintf (stderr, " (sparc64-elf)")
26 /* A 64 bit v9 compiler in a Medium/Anywhere code model environment. */
28 #define TARGET_DEFAULT \
29 (MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
30 + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
32 #undef SPARC_DEFAULT_CMODEL
33 #define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
35 /* Don't assume anything about the header files. */
36 #define NO_IMPLICIT_EXTERN_C
38 /* __svr4__ is used by the C library (FIXME) */
39 #undef CPP_SUBTARGET_SPEC
40 #define CPP_SUBTARGET_SPEC "-D__svr4__"
43 #undef MD_STARTFILE_PREFIX
47 %{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
48 %{mlittle-endian:-EL} \
49 %(asm_cpu) %(asm_arch) \
52 /* This is taken from sol2.h. */
56 %{mlittle-endian:-EL} \
59 /* We need something a little simpler for the embedded environment.
60 Profiling doesn't really work yet so we just copy the default. */
62 #define STARTFILE_SPEC "\
63 %{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} \
68 #define ENDFILE_SPEC \
69 "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
72 /* Use the default (for now). */
75 /* This defines which switch letters take arguments.
76 It is as in svr4.h but with -R added. */
77 #undef SWITCH_TAKES_ARG
78 #define SWITCH_TAKES_ARG(CHAR) \
79 (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
84 #undef BYTES_BIG_ENDIAN
85 #define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
87 #undef WORDS_BIG_ENDIAN
88 #define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
90 #undef LOCAL_LABEL_PREFIX
91 #define LOCAL_LABEL_PREFIX "."
93 /* This is how to store into the string LABEL
94 the symbol_ref name of an internal numbered label where
95 PREFIX is the class of label and NUM is the number within the class.
96 This is suitable for output with `assemble_name'. */
98 #undef ASM_GENERATE_INTERNAL_LABEL
99 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
100 sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
102 /* ??? This should be 32 bits for v9 but what can we do? */
104 #define WCHAR_TYPE "short unsigned int"
106 #undef WCHAR_TYPE_SIZE
107 #define WCHAR_TYPE_SIZE 16
109 #undef LONG_DOUBLE_TYPE_SIZE
110 #define LONG_DOUBLE_TYPE_SIZE 128
112 /* The medium/anywhere code model practically requires us to put jump tables
113 in the text section as gcc is unable to distinguish LABEL_REF's of jump
114 tables from other label refs (when we need to). */
115 /* But we now defer the tables to the end of the function, so we make
116 this 0 to not confuse the branch shortening code. */
117 #undef JUMP_TABLES_IN_TEXT_SECTION
118 #define JUMP_TABLES_IN_TEXT_SECTION 0