1 /* Target definitions for GNU compiler for Intel 80860 running OSF/1AD
2 Copyright (C) 1991, 1996 Free Software Foundation, Inc.
4 Based upon original work of Ron Guilmette (rfg@netcom.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, 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. */
27 #include "i860/i860.h"
30 /* For the sake of libgcc2.c, indicate target supports atexit. */
33 #undef TARGET_SWITCHES
34 #define TARGET_SWITCHES \
40 { "", TARGET_DEFAULT}}
43 #define TARGET_DEFAULT 1
45 /* The Intel as860 assembler does not understand .stabs, must use COFF */
46 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
49 #define TARGET_VERSION fprintf (stderr, " (i860 OSF/1AD)");
52 #define CPP_PREDEFINES "-Di860 -D__i860 -D__i860__ -D__PARAGON__ -D__OSF1__ -D_COFF -Dunix -DMACH -DCMU"
54 #define CPP_SPEC "%{mnx:-D__NODE}"
56 /* autoinit.o autolaunches NX applications */
57 #define STARTFILE_SPEC "crt0.o%s %{mnx:-yoptions/autoinit.o%s}"
59 /* libic.a is the PGI intrinsic library */
60 /* libpm.o and guard.o are for the performance monitoring modules (ignored) */
61 /* /usr/lib/noieee contains non-IEEE compliant (but faster) math routines */
63 #define LIB_SPEC "%{mnoieee:-L/usr/lib/noieee} %{mnx:-lnx -lmach} %
65 #else /* HAVE_DASH_G */
66 /* can't use -g for -lg; libg.a doesn't have a symbol table and ld complains */
67 #define LIB_SPEC "%{mnoieee:-L/usr/lib/noieee} %{mnx:-lnx -lmach} -lc -lic"
68 #endif /* HAVE_DASH_G */
70 /* Get rid of definition from svr3.h. */
73 #undef I860_REG_PREFIX
75 #undef ASM_COMMENT_START
76 #define ASM_COMMENT_START "//"
78 #undef TYPE_OPERAND_FMT
79 #define TYPE_OPERAND_FMT "\"%s\""
81 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
83 #undef ASCII_DATA_ASM_OP
84 #define ASCII_DATA_ASM_OP ".byte"
87 * the assembler we're using doesn't grok .ident...
89 #undef ASM_OUTPUT_IDENT
90 #define ASM_OUTPUT_IDENT(FILE, NAME) \
91 fprintf (FILE, "//\t.ident \"%s\"\n", NAME);
94 * the assembler doesn't grok .double INF and the like
95 * but does understand .long with hex numbers, so special
96 * case the "symbolic" IEEE numbers.
98 #undef ASM_OUTPUT_DOUBLE
99 #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
101 if (REAL_VALUE_ISINF (VALUE) \
102 || REAL_VALUE_ISNAN (VALUE) \
103 || REAL_VALUE_MINUS_ZERO (VALUE)) \
106 REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
107 fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t[0], t[1]); \
110 fprintf (FILE, "\t.double %.20e\n", VALUE); \
113 #undef ASM_OUTPUT_FLOAT
114 #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
116 if (REAL_VALUE_ISINF (VALUE) \
117 || REAL_VALUE_ISNAN (VALUE) \
118 || REAL_VALUE_MINUS_ZERO (VALUE)) \
121 REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
122 fprintf (FILE, "\t.long 0x%lx\n", t); \
125 fprintf (FILE, "\t.float %.12e\n", VALUE); \
128 #undef ASM_OUTPUT_ASCII
129 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
132 register unsigned char *str = (unsigned char *) (STR); \
133 register unsigned char *limit = str + (LENGTH); \
134 register unsigned bytes_in_chunk = 0; \
135 for (; str < limit; str++) \
137 register unsigned ch = *str; \
138 if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127) \
140 if (bytes_in_chunk > 0) \
142 fprintf ((FILE), "\"\n"); \
143 bytes_in_chunk = 0; \
145 fprintf ((FILE), "\t%s\t%d\n", ASM_BYTE_OP, ch); \
149 if (bytes_in_chunk >= 60) \
151 fprintf ((FILE), "\"\n"); \
152 bytes_in_chunk = 0; \
154 if (bytes_in_chunk == 0) \
155 fprintf ((FILE), "\t%s\t\"", ASCII_DATA_ASM_OP);\
160 if (bytes_in_chunk > 0) \
161 fprintf ((FILE), "\"\n"); \
166 /* This says how to output an assembler line
167 to define a local common symbol. */
169 #undef ASM_OUTPUT_LOCAL
170 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
171 ( fputs (".lcomm ", (FILE)), \
172 assemble_name ((FILE), (NAME)), \
173 fprintf ((FILE), ",%u\n", (ROUNDED)))
176 * not defining ASM_STABS_OP yields .stabs in the .s file
177 * when using g++ -- so, I'll define it.
179 #define ASM_STABS_OP "//.stabs"
181 /* Define this macro if an argument declared as `char' or `short' in a
182 prototype should actually be passed as an `int'. In addition to
183 avoiding errors in certain cases of mismatch, it also makes for
184 better code on certain machines. */
185 /*#define PROMOTE_PROTOTYPES*/
187 /* Define this macro if an instruction to load a value narrower
188 than a word from memory into a register also zero-extends the
189 value to the whole register. */
190 /*#define BYTE_LOADS_ZERO_EXTEND*/
192 /* Define this macro as a C expression which is nonzero if
193 accessing less than a word of memory (i.e. a `char' or a
194 `short') is no faster than accessing a word of memory, i.e., if
195 such access require more than one instruction or if there is no
196 difference in cost between byte and (aligned) word loads.
198 On RISC machines, it tends to generate better code to define
199 this as 1, since it avoids making a QI or HI mode register. */
201 #undef SLOW_BYTE_ACCESS
202 #define SLOW_BYTE_ACCESS 1
205 /* Define if shifts truncate the shift count
206 which implies one can omit a sign-extension or zero-extension
208 #define SHIFT_COUNT_TRUNCATED 1
211 #define FASTEST_ALIGNMENT 32
213 /* Make strings word-aligned so strcpy from constants will be faster. */
214 #define CONSTANT_ALIGNMENT(EXP, ALIGN) \
215 (TREE_CODE (EXP) == STRING_CST \
216 && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
218 /* Make arrays of chars word-aligned for the same reasons. */
219 #define DATA_ALIGNMENT(TYPE, ALIGN) \
220 (TREE_CODE (TYPE) == ARRAY_TYPE \
221 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
222 && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
225 * disable a few things picked up from svr3.h
227 #undef INIT_SECTION_ASM_OP
228 #undef FINI_SECTION_ASM_OP
229 #undef CONST_SECTION_ASM_OP
230 #undef CTORS_SECTION_ASM_OP
231 #undef DTORS_SECTION_ASM_OP
232 #undef DO_GLOBAL_CTORS_BODY
233 #undef ASM_OUTPUT_DESTRUCTOR
234 #undef SELECT_SECTION
235 #undef SELECT_RTX_SECTION
236 #undef READONLY_DATA_SECTION
238 #define BSS_SECTION_ASM_OP ".bss" /* XXX */
239 #undef EXTRA_SECTIONS
240 #undef EXTRA_SECTION_FUNCTIONS