]> gcc.gnu.org Git - gcc.git/blob - gcc/config/rs6000/sol2.h
Daily bump.
[gcc.git] / gcc / config / rs6000 / sol2.h
1 /* Definitions of target machine for GNU compiler,
2 for IBM RS/6000 running AIX version 3.1.
3 Copyright (C) 1996, 1997 Free Software Foundation, Inc.
4 Contributed by David Reese (Dave.Reese@East.Sun.COM)
5
6 This file is part of GNU CC.
7
8 GNU CC 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 GNU CC 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 GNU CC; 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 #include "rs6000/sysv4le.h"
24
25 /* Default ABI to use */
26 #undef RS6000_ABI_NAME
27 #define RS6000_ABI_NAME "solaris"
28
29 #undef ASM_CPU_SPEC
30 #define ASM_CPU_SPEC "-le -s"
31
32 #undef TARGET_DEFAULT
33 #define TARGET_DEFAULT (MASK_POWERPC | \
34 MASK_NEW_MNEMONICS | \
35 MASK_LITTLE_ENDIAN | \
36 MASK_REGNAMES)
37
38 #undef LIB_DEFAULT_SPEC
39 #define LIB_DEFAULT_SPEC "%(lib_solaris)"
40
41 #undef STARTFILE_DEFAULT_SPEC
42 #define STARTFILE_DEFAULT_SPEC "%(startfile_solaris)"
43
44 #undef ENDFILE_DEFAULT_SPEC
45 #define ENDFILE_DEFAULT_SPEC "%(endfile_solaris)"
46
47 #undef LINK_START_DEFAULT_SPEC
48 #define LINK_START_DEFAULT_SPEC "%(link_start_solaris)"
49
50 #undef CPP_SPEC
51 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
52 %(cpp_sysv) %(cpp_endian) %(cpp_cpu) \
53 %{mmvme: %(cpp_os_mvme) } \
54 %{msim: %(cpp_os_sim) } \
55 %{mcall-linux: %(cpp_os_linux) } \
56 %{mcall-solaris: %(cpp_os_solaris) } \
57 %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(cpp_os_default) }}}}"
58
59 #undef CPP_OS_DEFAULT_SPEC
60 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_solaris)"
61
62 #undef LINK_OS_DEFAULT_SPEC
63 #define LINK_OS_DEFAULT_SPEC "%(link_os_solaris)"
64
65 #undef CPP_ENDIAN_LITTLE_SPEC
66 #define CPP_ENDIAN_LITTLE_SPEC CPP_ENDIAN_SOLARIS_SPEC
67
68 /* Don't turn -B into -L if the argument specifies a relative file name. */
69 #undef RELATIVE_PREFIX_NOT_LINKDIR
70
71 #define DEFAULT_PCC_STRUCT_RETURN 0
72
73 #undef TARGET_VERSION
74 #define TARGET_VERSION fprintf (stderr, " (PowerPC Solaris)");
75
76 \f
77 /* Macros to check register numbers against specific register classes. */
78
79 #undef PREFERRED_DEBUGGING_TYPE
80 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
81
82
83 #if 0
84 #undef ASM_OUTPUT_ALIGNED_LOCAL
85 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
86 do { \
87 fprintf ((FILE), "\t%s\t", ".lcomm"); \
88 assemble_name ((FILE), (NAME)); \
89 fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
90 } while (0)
91 #endif
92
93 /* Like block addresses, stabs line numbers are relative to the
94 current function. */
95
96 /* use .stabd instead of .stabn */
97
98 #define ASM_STABN_OP ".stabd"
99
100 #undef ASM_OUTPUT_SOURCE_LINE
101 #define ASM_OUTPUT_SOURCE_LINE(file, line) \
102 do \
103 { \
104 static int sym_lineno = 1; \
105 char *_p; \
106 fprintf (file, "\t.stabd 68,0,%d,.LM%d-", \
107 line, sym_lineno); \
108 STRIP_NAME_ENCODING (_p, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
109 assemble_name (file, _p); \
110 fprintf (file, "\n.LM%d:\n", sym_lineno); \
111 sym_lineno += 1; \
112 } \
113 while (0)
114
115 /* This is how to output an assembler line defining a `double' constant. */
116
117 #undef ASM_OUTPUT_DOUBLE
118 #define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
119 { \
120 if (REAL_VALUE_ISINF (VALUE) \
121 || REAL_VALUE_ISNAN (VALUE) \
122 || REAL_VALUE_MINUS_ZERO (VALUE)) \
123 { \
124 long t[2]; \
125 REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
126 fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", \
127 t[0] & 0xffffffff, t[1] & 0xffffffff); \
128 } \
129 else \
130 { \
131 char str[30]; \
132 REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", str); \
133 fprintf (FILE, "\t.double %s\n", str); \
134 } \
135 }
136
137 /* This is how to output an assembler line defining a `float' constant. */
138
139 #undef ASM_OUTPUT_FLOAT
140 #define ASM_OUTPUT_FLOAT(FILE, VALUE) \
141 { \
142 if (REAL_VALUE_ISINF (VALUE) \
143 || REAL_VALUE_ISNAN (VALUE) \
144 || REAL_VALUE_MINUS_ZERO (VALUE)) \
145 { \
146 long t; \
147 REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
148 fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \
149 } \
150 else \
151 { \
152 char str[30]; \
153 REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
154 fprintf (FILE, "\t.float %s\n", str); \
155 } \
156 }
157
158 \f
159 /* Sun-ppc assembler does not permit '.' in some symbol names.
160 Use 'name_.labelno' instead. */
161 #undef ASM_FORMAT_PRIVATE_NAME
162 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
163 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
164 sprintf ((OUTPUT), "%s_.%d", (NAME), (LABELNO)))
165
166
167 /* Define this macro as a C expression for the initializer of an
168 array of string to tell the driver program which options are
169 defaults for this target and thus do not need to be handled
170 specially when using `MULTILIB_OPTIONS'.
171
172 Do not define this macro if `MULTILIB_OPTIONS' is not defined in
173 the target makefile fragment or if none of the options listed in
174 `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
175
176 #undef MULTILIB_DEFAULTS
177 #define MULTILIB_DEFAULTS { "mlittle", "mcall-solaris" }
178
179 #define STDC_0_IN_SYSTEM_HEADERS
This page took 0.176739 seconds and 5 git commands to generate.