1 /* Target definitions for GNU compiler for Intel 80860 running OSF/1AD
2 Copyright (C) 1991, 1996 Free Software Foundation, Inc.
3 Based upon original work of Ron Guilmette (rfg@monkeys.com).
4 Contributed by Andy Pfiffer (andyp@ssd.intel.com).
6 Pete Beckman of Indiana University (beckman@cs.indiana.edu)
7 Harry Dolan of Intel Corporation (dolan@ssd.intel.com)
9 This file is part of GNU CC.
11 GNU CC is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
16 GNU CC is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with GNU CC; see the file COPYING. If not, write to
23 the Free Software Foundation, 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. */
26 /* For the sake of libgcc2.c, indicate target supports atexit. */
29 #undef TARGET_SWITCHES
30 #define TARGET_SWITCHES \
31 { {"xp", 1, "Generate code which uses the FPU"}, \
32 {"noxp", -1, "Do not generate code which uses the FPU"}, \
33 {"xr", -1, "Do not generate code which uses the FPU"}, \
34 {"noieee", -1, "Do not generate code which uses the FPU"}, \
36 { "", TARGET_DEFAULT, NULL}}
39 #define TARGET_DEFAULT 1
41 /* The Intel as860 assembler does not understand .stabs, must use COFF */
42 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
45 #define TARGET_VERSION fprintf (stderr, " (i860 OSF/1AD)");
48 #define CPP_PREDEFINES "-Di860 -D__i860 -D__i860__ -D__PARAGON__ -D__OSF1__ -D_COFF -Dunix -DMACH -DCMU"
50 #define CPP_SPEC "%{mnx:-D__NODE}"
52 /* autoinit.o autolaunches NX applications */
53 #define STARTFILE_SPEC "crt0.o%s %{mnx:-yoptions/autoinit.o%s}"
55 /* libic.a is the PGI intrinsic library */
56 /* libpm.o and guard.o are for the performance monitoring modules (ignored) */
57 /* /usr/lib/noieee contains non-IEEE compliant (but faster) math routines */
60 "%{mnoieee:-L/usr/lib/noieee} %{mnx:-lnx} %{g*:-lg} -lc -lmach -lc -lic"
61 #else /* HAVE_DASH_G */
62 /* can't use -g for -lg; libg.a doesn't have a symbol table and ld complains */
63 #define LIB_SPEC "%{mnoieee:-L/usr/lib/noieee} %{mnx:-lnx} -lc -lmach -lc -lic"
64 #endif /* HAVE_DASH_G */
66 /* Get rid of definition from svr3.h. */
69 #undef I860_REG_PREFIX
71 #undef ASM_COMMENT_START
72 #define ASM_COMMENT_START "//"
74 #undef TYPE_OPERAND_FMT
75 #define TYPE_OPERAND_FMT "\"%s\""
77 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
79 #undef ASCII_DATA_ASM_OP
80 #define ASCII_DATA_ASM_OP ".byte"
83 * the assembler we're using doesn't grok .ident...
85 #undef ASM_OUTPUT_IDENT
86 #define ASM_OUTPUT_IDENT(FILE, NAME) \
87 fprintf (FILE, "//\t.ident \"%s\"\n", NAME);
90 * the assembler doesn't grok .double INF and the like
91 * but does understand .long with hex numbers, so special
92 * case the "symbolic" IEEE numbers.
94 #undef ASM_OUTPUT_DOUBLE
95 #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
97 if (REAL_VALUE_ISINF (VALUE) \
98 || REAL_VALUE_ISNAN (VALUE) \
99 || REAL_VALUE_MINUS_ZERO (VALUE)) \
102 REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
103 fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t[0], t[1]); \
106 fprintf (FILE, "\t.double %.20e\n", VALUE); \
109 #undef ASM_OUTPUT_FLOAT
110 #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
112 if (REAL_VALUE_ISINF (VALUE) \
113 || REAL_VALUE_ISNAN (VALUE) \
114 || REAL_VALUE_MINUS_ZERO (VALUE)) \
117 REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
118 fprintf (FILE, "\t.long 0x%lx\n", t); \
121 fprintf (FILE, "\t.float %.12e\n", VALUE); \
124 #undef ASM_OUTPUT_ASCII
125 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
128 register unsigned char *str = (unsigned char *) (STR); \
129 register unsigned char *limit = str + (LENGTH); \
130 register unsigned bytes_in_chunk = 0; \
131 for (; str < limit; str++) \
133 register unsigned ch = *str; \
134 if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127) \
136 if (bytes_in_chunk > 0) \
138 fprintf ((FILE), "\"\n"); \
139 bytes_in_chunk = 0; \
141 fprintf ((FILE), "\t%s\t%d\n", ASM_BYTE_OP, ch); \
145 if (bytes_in_chunk >= 60) \
147 fprintf ((FILE), "\"\n"); \
148 bytes_in_chunk = 0; \
150 if (bytes_in_chunk == 0) \
151 fprintf ((FILE), "\t%s\t\"", ASCII_DATA_ASM_OP);\
156 if (bytes_in_chunk > 0) \
157 fprintf ((FILE), "\"\n"); \
162 /* This says how to output an assembler line
163 to define a local common symbol. */
165 #undef ASM_OUTPUT_LOCAL
166 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
167 ( fputs (".lcomm ", (FILE)), \
168 assemble_name ((FILE), (NAME)), \
169 fprintf ((FILE), ",%u\n", (ROUNDED)))
172 * not defining ASM_STABS_OP yields .stabs in the .s file
173 * when using g++ -- so, I'll define it.
175 #define ASM_STABS_OP "//.stabs"
177 /* Define this macro if an instruction to load a value narrower
178 than a word from memory into a register also zero-extends the
179 value to the whole register. */
180 /*#define BYTE_LOADS_ZERO_EXTEND*/
182 /* Define this macro as a C expression which is nonzero if
183 accessing less than a word of memory (i.e. a `char' or a
184 `short') is no faster than accessing a word of memory, i.e., if
185 such access require more than one instruction or if there is no
186 difference in cost between byte and (aligned) word loads.
188 On RISC machines, it tends to generate better code to define
189 this as 1, since it avoids making a QI or HI mode register. */
191 #undef SLOW_BYTE_ACCESS
192 #define SLOW_BYTE_ACCESS 1
195 /* Define if shifts truncate the shift count
196 which implies one can omit a sign-extension or zero-extension
198 #define SHIFT_COUNT_TRUNCATED 1
201 #define FASTEST_ALIGNMENT 32
203 /* Make strings word-aligned so strcpy from constants will be faster. */
204 #define CONSTANT_ALIGNMENT(EXP, ALIGN) \
205 (TREE_CODE (EXP) == STRING_CST \
206 && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
208 /* Make arrays of chars word-aligned for the same reasons. */
209 #define DATA_ALIGNMENT(TYPE, ALIGN) \
210 (TREE_CODE (TYPE) == ARRAY_TYPE \
211 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
212 && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
215 * disable a few things picked up from svr3.h
217 #undef INIT_SECTION_ASM_OP
218 #undef FINI_SECTION_ASM_OP
219 #undef CONST_SECTION_ASM_OP
220 #undef CTORS_SECTION_ASM_OP
221 #undef DTORS_SECTION_ASM_OP
222 #undef DO_GLOBAL_CTORS_BODY
223 #undef ASM_OUTPUT_DESTRUCTOR
224 #undef SELECT_SECTION
225 #undef SELECT_RTX_SECTION
226 #undef READONLY_DATA_SECTION
228 #define BSS_SECTION_ASM_OP ".bss" /* XXX */
229 #undef EXTRA_SECTIONS
230 #undef EXTRA_SECTION_FUNCTIONS