]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/gcc/config/sparc/sp64-elf.h
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / gcc / config / sparc / sp64-elf.h
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.
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 2, 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 COPYING.  If not, write to
20 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.  */
22
23 #undef TARGET_VERSION
24 #define TARGET_VERSION fprintf (stderr, " (sparc64-elf)")
25
26 /* A 64 bit v9 compiler in a Medium/Anywhere code model environment.  */
27 #undef TARGET_DEFAULT
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)
31
32 #undef SPARC_DEFAULT_CMODEL
33 #define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
34
35 /* Don't assume anything about the header files.  */
36 #define NO_IMPLICIT_EXTERN_C
37
38 /* __svr4__ is used by the C library (FIXME) */
39 #undef CPP_SUBTARGET_SPEC
40 #define CPP_SUBTARGET_SPEC "-D__svr4__"
41
42 #undef MD_EXEC_PREFIX
43 #undef MD_STARTFILE_PREFIX
44
45 #undef ASM_SPEC
46 #define ASM_SPEC "\
47 %{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
48 %{mlittle-endian:-EL} \
49 %(asm_cpu) %(asm_arch) \
50 "
51
52 /* This is taken from sol2.h.  */
53 #undef LINK_SPEC
54 #define LINK_SPEC "\
55 %{v:-V} \
56 %{mlittle-endian:-EL} \
57 "
58
59 /* We need something a little simpler for the embedded environment.
60    Profiling doesn't really work yet so we just copy the default.  */
61 #undef STARTFILE_SPEC
62 #define STARTFILE_SPEC "\
63 %{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} \
64 crtbegin.o%s \
65 "
66
67 #undef ENDFILE_SPEC
68 #define ENDFILE_SPEC \
69   "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
70    crtend.o%s"
71
72 /* Use the default (for now).  */
73 #undef LIB_SPEC
74
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) \
80    || (CHAR) == 'R' \
81    || (CHAR) == 'h' \
82    || (CHAR) == 'z')
83
84 #undef BYTES_BIG_ENDIAN
85 #define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
86
87 #undef WORDS_BIG_ENDIAN
88 #define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
89 \f
90 #undef  LOCAL_LABEL_PREFIX
91 #define LOCAL_LABEL_PREFIX  "."
92
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'.  */
97
98 #undef  ASM_GENERATE_INTERNAL_LABEL
99 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)   \
100   sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
101 \f
102 /* ??? This should be 32 bits for v9 but what can we do?  */
103 #undef WCHAR_TYPE
104 #define WCHAR_TYPE "short unsigned int"
105
106 #undef WCHAR_TYPE_SIZE
107 #define WCHAR_TYPE_SIZE 16
108
109 #undef LONG_DOUBLE_TYPE_SIZE
110 #define LONG_DOUBLE_TYPE_SIZE 128
111
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