]> gcc.gnu.org Git - gcc.git/blame - gcc/config/rs6000/sol2.h
Daily bump.
[gcc.git] / gcc / config / rs6000 / sol2.h
CommitLineData
c81bebd7
MM
1/* Definitions of target machine for GNU compiler,
2 for IBM RS/6000 running AIX version 3.1.
a0d66c8d 3 Copyright (C) 1996, 1997 Free Software Foundation, Inc.
9a57586f 4 Contributed by David Reese (Dave.Reese@East.Sun.COM)
c81bebd7
MM
5
6This file is part of GNU CC.
7
8GNU CC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GNU CC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU CC; see the file COPYING. If not, write to
5f38fdda
JL
20the Free Software Foundation, 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */
c81bebd7
MM
22
23#include "rs6000/sysv4le.h"
24
802a0058
MM
25/* Default ABI to use */
26#undef RS6000_ABI_NAME
27#define RS6000_ABI_NAME "solaris"
28
c81bebd7 29#undef ASM_CPU_SPEC
3201f6d9 30#define ASM_CPU_SPEC "-le -s"
c81bebd7 31
c81bebd7
MM
32#undef TARGET_DEFAULT
33#define TARGET_DEFAULT (MASK_POWERPC | \
34 MASK_NEW_MNEMONICS | \
35 MASK_LITTLE_ENDIAN | \
c81bebd7
MM
36 MASK_REGNAMES)
37
38#undef LIB_DEFAULT_SPEC
0bc25b2b 39#define LIB_DEFAULT_SPEC "%(lib_solaris)"
c81bebd7
MM
40
41#undef STARTFILE_DEFAULT_SPEC
0bc25b2b 42#define STARTFILE_DEFAULT_SPEC "%(startfile_solaris)"
c81bebd7
MM
43
44#undef ENDFILE_DEFAULT_SPEC
0bc25b2b 45#define ENDFILE_DEFAULT_SPEC "%(endfile_solaris)"
c81bebd7
MM
46
47#undef LINK_START_DEFAULT_SPEC
0bc25b2b
MM
48#define LINK_START_DEFAULT_SPEC "%(link_start_solaris)"
49
a0d66c8d
JL
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
0bc25b2b
MM
59#undef CPP_OS_DEFAULT_SPEC
60#define CPP_OS_DEFAULT_SPEC "%(cpp_os_solaris)"
c81bebd7 61
fba29a8c
MM
62#undef LINK_OS_DEFAULT_SPEC
63#define LINK_OS_DEFAULT_SPEC "%(link_os_solaris)"
64
5b9d9a0c
MM
65#undef CPP_ENDIAN_LITTLE_SPEC
66#define CPP_ENDIAN_LITTLE_SPEC CPP_ENDIAN_SOLARIS_SPEC
67
c81bebd7
MM
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
802a0058 83#if 0
c81bebd7
MM
84#undef ASM_OUTPUT_ALIGNED_LOCAL
85#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
86do { \
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)
802a0058 91#endif
c81bebd7
MM
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
c81bebd7
MM
100#undef ASM_OUTPUT_SOURCE_LINE
101#define ASM_OUTPUT_SOURCE_LINE(file, line) \
102do \
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 } \
113while (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)))
f7856bbc
MM
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
3807773b 177#define MULTILIB_DEFAULTS { "mlittle", "mcall-solaris" }
a0d66c8d
JL
178
179#define STDC_0_IN_SYSTEM_HEADERS
This page took 0.360259 seconds and 5 git commands to generate.