0ee9d08cee088f74b1401d18bccd1d95f65060de
[gcc.git] / 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, 2007, 2010,
3 2011
4 Free Software Foundation, Inc.
5 Contributed by Doug Evans, dje@cygnus.com.
6
7 This file is part of GCC.
8
9 GCC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
12 any later version.
13
14 GCC is distributed in the hope that it will be useful,
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
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
22
23 /* A 64 bit v9 compiler in a Medium/Anywhere code model environment. */
24 #undef TARGET_DEFAULT
25 #define TARGET_DEFAULT \
26 (MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
27 + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
28
29 #undef SPARC_DEFAULT_CMODEL
30 #define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
31
32 /* Don't assume anything about the header files. */
33 #define NO_IMPLICIT_EXTERN_C
34
35 /* __svr4__ is used by the C library (FIXME) */
36 #undef CPP_SUBTARGET_SPEC
37 #define CPP_SUBTARGET_SPEC "-D__svr4__"
38
39 #undef ASM_SPEC
40 #define ASM_SPEC "\
41 -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
42 %{mlittle-endian:-EL} \
43 %(asm_cpu) %(asm_arch) \
44 "
45
46 /* This is taken from sol2.h. */
47 #undef LINK_SPEC
48 #define LINK_SPEC "\
49 %{v:-V} \
50 %{mlittle-endian:-EL} \
51 "
52
53 /* We need something a little simpler for the embedded environment.
54 Profiling doesn't really work yet so we just copy the default. */
55 #undef STARTFILE_SPEC
56 #define STARTFILE_SPEC "\
57 %{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} \
58 crtbegin.o%s \
59 "
60
61 #undef ENDFILE_SPEC
62 #define ENDFILE_SPEC \
63 "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
64 crtend.o%s"
65
66 /* Use the default (for now). */
67 #undef LIB_SPEC
68
69 #undef BYTES_BIG_ENDIAN
70 #define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
71
72 #undef WORDS_BIG_ENDIAN
73 #define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
74 \f
75 #undef LOCAL_LABEL_PREFIX
76 #define LOCAL_LABEL_PREFIX "."
77
78 /* This is how to store into the string LABEL
79 the symbol_ref name of an internal numbered label where
80 PREFIX is the class of label and NUM is the number within the class.
81 This is suitable for output with `assemble_name'. */
82
83 #undef ASM_GENERATE_INTERNAL_LABEL
84 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
85 sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
86 \f
87 /* ??? This should be 32 bits for v9 but what can we do? */
88 #undef WCHAR_TYPE
89 #define WCHAR_TYPE "short unsigned int"
90
91 #undef WCHAR_TYPE_SIZE
92 #define WCHAR_TYPE_SIZE 16
93
94 #undef LONG_DOUBLE_TYPE_SIZE
95 #define LONG_DOUBLE_TYPE_SIZE 128