OSDN Git Service

16fa8e06a4e3d7312052c19d1f4b45c4f770f283
[pf3gnuchains/gcc-fork.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
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, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA.  */
22
23 /* ??? We're taking the scheme of including another file and then overriding
24    the values we don't like a bit too far here.  The alternative is to more or
25    less duplicate all of svr4.h, sparc/sysv4.h, and sparc/sol2.h here
26    (suitably cleaned up).  */
27
28 #undef TARGET_VERSION
29 #define TARGET_VERSION fprintf (stderr, " (sparc64-elf)")
30
31 /* A 64 bit v9 compiler in a Medium/Anywhere code model environment.  */
32
33 #undef TARGET_DEFAULT
34 #define TARGET_DEFAULT \
35 (MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
36  + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
37
38 #undef SPARC_DEFAULT_CMODEL
39 #define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
40
41 /* Target OS builtins for config/sol.h.  */
42 #undef TARGET_SUB_OS_CPP_BUILTINS
43 #define TARGET_SUB_OS_CPP_BUILTINS()            \
44   do                                            \
45     {                                           \
46         builtin_define_std ("sparc");           \
47     }                                           \
48   while (0)
49
50 /* __svr4__ is used by the C library (FIXME) */
51 #undef CPP_SUBTARGET_SPEC
52 #define CPP_SUBTARGET_SPEC "-D__svr4__"
53
54 #undef MD_EXEC_PREFIX
55 #undef MD_STARTFILE_PREFIX
56
57 #undef ASM_SPEC
58 #define ASM_SPEC "\
59 %{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
60 %{mlittle-endian:-EL} \
61 %(asm_cpu) %(asm_arch) \
62 "
63
64 /* This is taken from sol2.h.  */
65 #undef LINK_SPEC
66 #define LINK_SPEC "\
67 %{v:-V} \
68 %{mlittle-endian:-EL} \
69 "
70
71 /* We need something a little simpler for the embedded environment.
72    Profiling doesn't really work yet so we just copy the default.  */
73 #undef STARTFILE_SPEC
74 #define STARTFILE_SPEC "\
75 %{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} \
76 crtbegin.o%s \
77 "
78
79 #undef ENDFILE_SPEC
80 #define ENDFILE_SPEC \
81   "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
82    crtend.o%s"
83
84 /* Use the default (for now).  */
85 #undef LIB_SPEC
86
87 /* V9 chips can handle either endianness.  */
88 #undef SUBTARGET_SWITCHES
89 #define SUBTARGET_SWITCHES \
90 {"big-endian", -MASK_LITTLE_ENDIAN, N_("Generate code for big endian") }, \
91 {"little-endian", MASK_LITTLE_ENDIAN, N_("Generate code for little endian") },
92
93 #undef BYTES_BIG_ENDIAN
94 #define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
95
96 #undef WORDS_BIG_ENDIAN
97 #define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
98
99 /* ??? This should be 32 bits for v9 but what can we do?  */
100 #undef WCHAR_TYPE
101 #define WCHAR_TYPE "short unsigned int"
102
103 #undef WCHAR_TYPE_SIZE
104 #define WCHAR_TYPE_SIZE 16
105
106 #undef LONG_DOUBLE_TYPE_SIZE
107 #define LONG_DOUBLE_TYPE_SIZE 128
108
109 /* The medium/anywhere code model practically requires us to put jump tables
110    in the text section as gcc is unable to distinguish LABEL_REF's of jump
111    tables from other label refs (when we need to).  */
112 /* But we now defer the tables to the end of the function, so we make
113    this 0 to not confuse the branch shortening code.  */
114 #undef JUMP_TABLES_IN_TEXT_SECTION
115 #define JUMP_TABLES_IN_TEXT_SECTION 0
116
117 /* System V Release 4 uses DWARF debugging info.
118    GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF
119    anyway so it is the default.  */
120
121 #define DBX_DEBUGGING_INFO 1
122
123 #undef PREFERRED_DEBUGGING_TYPE
124 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
125
126 /* Don't include Solaris-specific format checks.  */
127 #undef TARGET_N_FORMAT_TYPES
128 #undef TARGET_FORMAT_TYPES