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