OSDN Git Service

2001-11-12 David O'Brien <obrien@FreeBSD.org>
[pf3gnuchains/gcc-fork.git] / gcc / config / sparc / vxsim.h
1 /* Definitions of target machine for GNU compiler, for SPARC VxSim
2    Copyright 1996 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
22
23 #undef CPP_PREDEFINES
24 #define CPP_PREDEFINES \
25  "-DCPU=SIMSPARCSOLARIS -D__vxworks -D__vxworks__ -Dsparc -D__svr4__ -D__SVR4 \
26   -Asystem=embedded -Asystem=svr4 -Acpu=sparc -Amachine=sparc\
27   -D__GCC_NEW_VARARGS__"
28
29 #undef CPP_SPEC
30 #define CPP_SPEC ""
31
32 #undef CC1_SPEC
33 #define CC1_SPEC "-fno-builtin %{sun4:} %{target:}"
34
35 /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
36    It's safe to pass -s always, even if -g is not used.  */
37 #undef ASM_SPEC
38 #define ASM_SPEC \
39   "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
40    %{fpic:-K PIC} %{fPIC:-K PIC}"
41
42 /* However it appears that Solaris 2.0 uses the same reg numbering as
43    the old BSD-style system did.  */
44
45 #undef DBX_REGISTER_NUMBER
46 /* Same as sparc.h */
47 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
48
49 /* We use stabs-in-elf for debugging, because that is what the native
50    toolchain uses.  */
51 #undef PREFERRED_DEBUGGING_TYPE
52 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
53
54 /* The Solaris 2 assembler uses .skip, not .zero, so put this back.  */
55 #undef ASM_OUTPUT_SKIP
56 #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
57   fprintf (FILE, "\t.skip %u\n", (SIZE))
58
59 #undef ASM_OUTPUT_ALIGNED_LOCAL
60 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)               \
61 do {                                                                    \
62   fputs ("\t.local\t", (FILE));         \
63   assemble_name ((FILE), (NAME));                                       \
64   putc ('\n', (FILE));                                                  \
65   ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN);                  \
66 } while (0)
67
68 #undef COMMON_ASM_OP
69 #define COMMON_ASM_OP "\t.common\t"
70
71 /* This is how to output a definition of an internal numbered label where
72    PREFIX is the class of label and NUM is the number within the class.  */
73
74 #undef  ASM_OUTPUT_INTERNAL_LABEL
75 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)      \
76   fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
77
78 /* This is how to output a reference to an internal numbered label where
79    PREFIX is the class of label and NUM is the number within the class.  */
80
81 #undef  ASM_OUTPUT_INTERNAL_LABELREF
82 #define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM)   \
83   fprintf (FILE, ".L%s%d", PREFIX, NUM)
84
85 /* This is how to store into the string LABEL
86    the symbol_ref name of an internal numbered label where
87    PREFIX is the class of label and NUM is the number within the class.
88    This is suitable for output with `assemble_name'.  */
89
90 #undef  ASM_GENERATE_INTERNAL_LABEL
91 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)   \
92   sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM))
93
94 \f
95
96 #undef LIB_SPEC
97 #define LIB_SPEC ""
98
99 #undef STARTFILE_SPEC
100 #define STARTFILE_SPEC ""
101
102 #undef  ENDFILE_SPEC
103 #define ENDFILE_SPEC ""
104
105 #undef LINK_SPEC
106 #define LINK_SPEC "-r"
107
108 /* This defines which switch letters take arguments.
109    It is as in svr4.h but with -R added.  */
110
111 #undef SWITCH_TAKES_ARG
112 #define SWITCH_TAKES_ARG(CHAR) \
113   (   (CHAR) == 'D' \
114    || (CHAR) == 'U' \
115    || (CHAR) == 'o' \
116    || (CHAR) == 'e' \
117    || (CHAR) == 'u' \
118    || (CHAR) == 'I' \
119    || (CHAR) == 'm' \
120    || (CHAR) == 'L' \
121    || (CHAR) == 'R' \
122    || (CHAR) == 'A' \
123    || (CHAR) == 'h' \
124    || (CHAR) == 'z')
125 \f
126 /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h.
127    Instead, it is enabled here, because it does work under Solaris.  */
128 /* Define for support of TFmode long double and REAL_ARITHMETIC.
129    Sparc ABI says that long double is 4 words.  */
130 #define LONG_DOUBLE_TYPE_SIZE 64