]>
gcc.gnu.org Git - gcc.git/blob - 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)
6 This file is part of GNU CC.
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)
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.
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. */
23 #include "rs6000/sysv4le.h"
25 /* Default ABI to use */
26 #undef RS6000_ABI_NAME
27 #define RS6000_ABI_NAME "solaris"
30 #define ASM_CPU_SPEC "-le -s"
33 #define TARGET_DEFAULT (MASK_POWERPC | \
34 MASK_NEW_MNEMONICS | \
35 MASK_LITTLE_ENDIAN | \
38 #undef LIB_DEFAULT_SPEC
39 #define LIB_DEFAULT_SPEC "%(lib_solaris)"
41 #undef STARTFILE_DEFAULT_SPEC
42 #define STARTFILE_DEFAULT_SPEC "%(startfile_solaris)"
44 #undef ENDFILE_DEFAULT_SPEC
45 #define ENDFILE_DEFAULT_SPEC "%(endfile_solaris)"
47 #undef LINK_START_DEFAULT_SPEC
48 #define LINK_START_DEFAULT_SPEC "%(link_start_solaris)"
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) }}}}"
59 #undef CPP_OS_DEFAULT_SPEC
60 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_solaris)"
62 #undef LINK_OS_DEFAULT_SPEC
63 #define LINK_OS_DEFAULT_SPEC "%(link_os_solaris)"
65 #undef CPP_ENDIAN_LITTLE_SPEC
66 #define CPP_ENDIAN_LITTLE_SPEC CPP_ENDIAN_SOLARIS_SPEC
68 /* Don't turn -B into -L if the argument specifies a relative file name. */
69 #undef RELATIVE_PREFIX_NOT_LINKDIR
71 #define DEFAULT_PCC_STRUCT_RETURN 0
74 #define TARGET_VERSION fprintf (stderr, " (PowerPC Solaris)");
77 /* Macros to check register numbers against specific register classes. */
79 #undef PREFERRED_DEBUGGING_TYPE
80 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
84 #undef ASM_OUTPUT_ALIGNED_LOCAL
85 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
87 fprintf ((FILE), "\t%s\t", ".lcomm"); \
88 assemble_name ((FILE), (NAME)); \
89 fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
93 /* Like block addresses, stabs line numbers are relative to the
96 /* use .stabd instead of .stabn */
98 #define ASM_STABN_OP ".stabd"
100 #undef ASM_OUTPUT_SOURCE_LINE
101 #define ASM_OUTPUT_SOURCE_LINE(file, line) \
104 static int sym_lineno = 1; \
106 fprintf (file, "\t.stabd 68,0,%d,.LM%d-", \
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); \
115 /* This is how to output an assembler line defining a `double' constant. */
117 #undef ASM_OUTPUT_DOUBLE
118 #define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
120 if (REAL_VALUE_ISINF (VALUE) \
121 || REAL_VALUE_ISNAN (VALUE) \
122 || REAL_VALUE_MINUS_ZERO (VALUE)) \
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); \
132 REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", str); \
133 fprintf (FILE, "\t.double %s\n", str); \
137 /* This is how to output an assembler line defining a `float' constant. */
139 #undef ASM_OUTPUT_FLOAT
140 #define ASM_OUTPUT_FLOAT(FILE, VALUE) \
142 if (REAL_VALUE_ISINF (VALUE) \
143 || REAL_VALUE_ISNAN (VALUE) \
144 || REAL_VALUE_MINUS_ZERO (VALUE)) \
147 REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
148 fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \
153 REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
154 fprintf (FILE, "\t.float %s\n", str); \
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)))
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'.
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::. */
176 #undef MULTILIB_DEFAULTS
177 #define MULTILIB_DEFAULTS { "mlittle", "mcall-solaris" }
179 #define STDC_0_IN_SYSTEM_HEADERS
This page took 0.176739 seconds and 5 git commands to generate.