1 /* Target definitions for GNU compiler for Intel 80860 running OSF/1AD
2 Copyright (C) 1991 Free Software Foundation, Inc.
4 Based upon original work of Ron Guilmette (rfg@ncd.com).
5 Whacked into submission by Andy Pfiffer (andyp@ssd.intel.com).
7 Pete Beckman @ Indiana University (beckman@cs.indiana.edu)
8 Harry Dolan of Intel Corporation (dolan@ssd.intel.com)
10 This file is part of GNU CC.
12 GNU CC is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2, or (at your option)
17 GNU CC is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with GNU CC; see the file COPYING. If not, write to
24 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
26 #include "i860/i860.h"
29 /* For the sake of libgcc2.c, indicate target supports atexit. */
32 #undef TARGET_SWITCHES
33 #define TARGET_SWITCHES \
39 { "", TARGET_DEFAULT}}
42 #define TARGET_DEFAULT 1
44 /* The Intel as860 assembler does not understand .stabs, must use COFF */
45 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
48 #define TARGET_VERSION fprintf (stderr, " (i860 OSF/1AD)");
51 #define CPP_PREDEFINES "-Di860 -D__i860 -D__i860__ -D__PARAGON__ -D__OSF1__ -D_COFF -Dunix -DMACH -DCMU"
53 #define CPP_SPEC "%{mnx:-D__NODE}"
55 /* autoinit.o autolaunches NX applications */
56 #define STARTFILE_SPEC "-ycrt0.o%s %{mnx:-yoptions/autoinit.o%s}"
58 /* libic.a is the PGI intrisic library */
59 /* libpm.o and guard.o are for the performance monitoring modules (ignored) */
60 /* /usr/lib/noieee contains non-IEEE compliant (but faster) math routines */
62 #define LIB_SPEC "%{mnoieee:-L/usr/lib/noieee} -L/usr/lib %{mnx:-lnx -lmach} %
64 #else /* HAVE_DASH_G */
65 /* can't use -g for -lg; libg.a doesn't have a symbol table and ld complains */
66 #define LIB_SPEC "%{mnoieee:-L/usr/lib/noieee} -L/usr/lib %{mnx:-lnx -lmach} -lc -lic"
67 #endif /* HAVE_DASH_G */
69 /* Get rid of definition from svr3.h. */
72 #undef I860_REG_PREFIX
74 #undef ASM_COMMENT_START
75 #define ASM_COMMENT_START "//"
77 #undef TYPE_OPERAND_FMT
78 #define TYPE_OPERAND_FMT "\"%s\""
80 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
82 #undef ASCII_DATA_ASM_OP
83 #define ASCII_DATA_ASM_OP ".byte"
86 * the assembler we're using doesn't grok .ident...
88 #undef ASM_OUTPUT_IDENT
89 #define ASM_OUTPUT_IDENT(FILE, NAME) \
90 fprintf (FILE, "//\t.ident \"%s\"\n", NAME);
93 * the assembler doesn't grok .double INF and the like
94 * but does understand .long with hex numbers, so special
95 * case the "symbolic" IEEE numbers.
97 #undef ASM_OUTPUT_DOUBLE
98 #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
100 if (REAL_VALUE_ISINF (VALUE) \
101 || REAL_VALUE_ISNAN (VALUE) \
102 || REAL_VALUE_MINUS_ZERO (VALUE)) \
105 REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
106 fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t[0], t[1]); \
109 fprintf (FILE, "\t.double %.20e\n", VALUE); \
112 #undef ASM_OUTPUT_FLOAT
113 #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
115 if (REAL_VALUE_ISINF (VALUE) \
116 || REAL_VALUE_ISNAN (VALUE) \
117 || REAL_VALUE_MINUS_ZERO (VALUE)) \
120 REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
121 fprintf (FILE, "\t.long 0x%lx\n", t); \
124 fprintf (FILE, "\t.float %.12e\n", VALUE); \
127 #undef ASM_OUTPUT_ASCII
128 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
131 register unsigned char *str = (unsigned char *) (STR); \
132 register unsigned char *limit = str + (LENGTH); \
133 register unsigned bytes_in_chunk = 0; \
134 for (; str < limit; str++) \
136 register unsigned ch = *str; \
137 if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127) \
139 if (bytes_in_chunk > 0) \
141 fprintf ((FILE), "\"\n"); \
142 bytes_in_chunk = 0; \
144 fprintf ((FILE), "\t%s\t%d\n", ASM_BYTE_OP, ch); \
148 if (bytes_in_chunk >= 60) \
150 fprintf ((FILE), "\"\n"); \
151 bytes_in_chunk = 0; \
153 if (bytes_in_chunk == 0) \
154 fprintf ((FILE), "\t%s\t\"", ASCII_DATA_ASM_OP);\
159 if (bytes_in_chunk > 0) \
160 fprintf ((FILE), "\"\n"); \
165 /* This says how to output an assembler line
166 to define a local common symbol. */
168 #undef ASM_OUTPUT_LOCAL
169 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
170 ( fputs (".lcomm ", (FILE)), \
171 assemble_name ((FILE), (NAME)), \
172 fprintf ((FILE), ",%u\n", (ROUNDED)))
175 * not defining ASM_STABS_OP yields .stabs in the .s file
176 * when using g++ -- so, I'll define it.
178 #define ASM_STABS_OP "//.stabs"
180 /* Define this macro if an argument declared as `char' or `short' in a
181 prototype should actually be passed as an `int'. In addition to
182 avoiding errors in certain cases of mismatch, it also makes for
183 better code on certain machines. */
184 /*#define PROMOTE_PROTOTYPES*/
186 /* Define this macro if an instruction to load a value narrower
187 than a word from memory into a register also zero-extends the
188 value to the whole register. */
189 /*#define BYTE_LOADS_ZERO_EXTEND*/
191 /* Define this macro as a C expression which is nonzero if
192 accessing less than a word of memory (i.e. a `char' or a
193 `short') is no faster than accessing a word of memory, i.e., if
194 such access require more than one instruction or if there is no
195 difference in cost between byte and (aligned) word loads.
197 On RISC machines, it tends to generate better code to define
198 this as 1, since it avoids making a QI or HI mode register. */
200 #undef SLOW_BYTE_ACCESS
201 #define SLOW_BYTE_ACCESS 1
204 /* Define if shifts truncate the shift count
205 which implies one can omit a sign-extension or zero-extension
207 #define SHIFT_COUNT_TRUNCATED 1
210 #define FASTEST_ALIGNMENT 32
212 /* Make strings word-aligned so strcpy from constants will be faster. */
213 #define CONSTANT_ALIGNMENT(EXP, ALIGN) \
214 (TREE_CODE (EXP) == STRING_CST \
215 && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
217 /* Make arrays of chars word-aligned for the same reasons. */
218 #define DATA_ALIGNMENT(TYPE, ALIGN) \
219 (TREE_CODE (TYPE) == ARRAY_TYPE \
220 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
221 && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
224 * disable a few things picked up from svr3.h
226 #undef INIT_SECTION_ASM_OP
227 #undef FINI_SECTION_ASM_OP
228 #undef CONST_SECTION_ASM_OP
229 #undef CTORS_SECTION_ASM_OP
230 #undef DTORS_SECTION_ASM_OP
231 #undef DO_GLOBAL_CTORS_BODY
232 #undef ASM_OUTPUT_DESTRUCTOR
233 #undef SELECT_SECTION
234 #undef SELECT_RTX_SECTION
235 #undef READONLY_DATA_SECTION
237 #define BSS_SECTION_ASM_OP ".bss" /* XXX */
238 #undef EXTRA_SECTIONS
239 #define EXTRA_SECTIONS in_bss
240 #undef EXTRA_SECTION_FUNCTIONS
241 #define EXTRA_SECTION_FUNCTIONS \