|
|
1.1 root 1: /* Target definitions for GNU compiler for Intel 80860 running OSF/1AD
2: Copyright (C) 1991 Free Software Foundation, Inc.
3:
4: Based upon original work of Ron Guilmette ([email protected]).
5: Whacked into submission by Andy Pfiffer ([email protected]).
6: Partially inspired by
7: Pete Beckman @ Indiana University ([email protected])
8: Harry Dolan of Intel Corporation ([email protected])
9:
10: This file is part of GNU CC.
11:
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)
15: any later version.
16:
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.
21:
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. */
25:
26: #include "i860/i860.h"
27: #include "svr3.h"
28:
29: /* For the sake of libgcc2.c, indicate target supports atexit. */
30: #define HAVE_ATEXIT
31:
32: #undef TARGET_SWITCHES
33: #define TARGET_SWITCHES \
34: { {"xp", 1}, \
35: {"noxp", -1}, \
36: {"xr", -1}, \
37: {"noieee", -1}, \
38: {"nx", 2}, \
39: { "", TARGET_DEFAULT}}
40:
41: #undef TARGET_DEFAULT
42: #define TARGET_DEFAULT 1
43:
44: /* The Intel as860 assembler does not understand .stabs, must use COFF */
45: #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
46:
47: #undef TARGET_VERSION
48: #define TARGET_VERSION fprintf (stderr, " (i860 OSF/1AD)");
49:
50: #undef CPP_PREDEFINES
51: #define CPP_PREDEFINES "-Di860 -D__i860 -D__i860__ -D__PARAGON__ -D__OSF1__ -D_COFF -Dunix -DMACH -DCMU"
52:
53: #define CPP_SPEC "%{mnx:-D__NODE}"
54:
55: /* autoinit.o autolaunches NX applications */
56: #define STARTFILE_SPEC "-ycrt0.o%s %{mnx:-yoptions/autoinit.o%s}"
57:
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 */
61: #if HAVE_DASH_G
62: #define LIB_SPEC "%{mnoieee:-L/usr/lib/noieee} -L/usr/lib %{mnx:-lnx -lmach} %
63: {g*:-lg} -lc -lic"
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 */
68:
69: /* Get rid of definition from svr3.h. */
70: #undef SIZE_TYPE
71:
72: #undef I860_REG_PREFIX
73:
74: #undef ASM_COMMENT_START
75: #define ASM_COMMENT_START "//"
76:
77: #undef TYPE_OPERAND_FMT
78: #define TYPE_OPERAND_FMT "\"%s\""
79:
80: #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
81:
82: #undef ASCII_DATA_ASM_OP
83: #define ASCII_DATA_ASM_OP ".byte"
84:
85: /*
86: * the assembler we're using doesn't grok .ident...
87: */
88: #undef ASM_OUTPUT_IDENT
89: #define ASM_OUTPUT_IDENT(FILE, NAME) \
90: fprintf (FILE, "//\t.ident \"%s\"\n", NAME);
91:
92: /*
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.
96: */
97: #undef ASM_OUTPUT_DOUBLE
98: #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
99: { \
100: if (REAL_VALUE_ISINF (VALUE) \
101: || REAL_VALUE_ISNAN (VALUE) \
102: || REAL_VALUE_MINUS_ZERO (VALUE)) \
103: { \
104: long t[2]; \
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]); \
107: } \
108: else \
109: fprintf (FILE, "\t.double %.20e\n", VALUE); \
110: }
111:
112: #undef ASM_OUTPUT_FLOAT
113: #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
114: { \
115: if (REAL_VALUE_ISINF (VALUE) \
116: || REAL_VALUE_ISNAN (VALUE) \
117: || REAL_VALUE_MINUS_ZERO (VALUE)) \
118: { \
119: long t; \
120: REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
121: fprintf (FILE, "\t.long 0x%lx\n", t); \
122: } \
123: else \
124: fprintf (FILE, "\t.float %.12e\n", VALUE); \
125: }
126:
127: #undef ASM_OUTPUT_ASCII
128: #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
129: do \
130: { \
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++) \
135: { \
136: register unsigned ch = *str; \
137: if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127) \
138: { \
139: if (bytes_in_chunk > 0) \
140: { \
141: fprintf ((FILE), "\"\n"); \
142: bytes_in_chunk = 0; \
143: } \
144: fprintf ((FILE), "\t%s\t%d\n", ASM_BYTE_OP, ch); \
145: } \
146: else \
147: { \
148: if (bytes_in_chunk >= 60) \
149: { \
150: fprintf ((FILE), "\"\n"); \
151: bytes_in_chunk = 0; \
152: } \
153: if (bytes_in_chunk == 0) \
154: fprintf ((FILE), "\t%s\t\"", ASCII_DATA_ASM_OP);\
155: putc (ch, (FILE)); \
156: bytes_in_chunk++; \
157: } \
158: } \
159: if (bytes_in_chunk > 0) \
160: fprintf ((FILE), "\"\n"); \
161: } \
162: while (0)
163:
164:
165: /* This says how to output an assembler line
166: to define a local common symbol. */
167:
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)))
173:
174: /*
175: * not defining ASM_STABS_OP yields .stabs in the .s file
176: * when using g++ -- so, I'll define it.
177: */
178: #define ASM_STABS_OP "//.stabs"
179:
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*/
185:
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*/
190:
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.
196:
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. */
199: /*
200: #undef SLOW_BYTE_ACCESS
201: #define SLOW_BYTE_ACCESS 1
202: */
203:
204: /* Define if shifts truncate the shift count
205: which implies one can omit a sign-extension or zero-extension
206: of a shift count. */
207: #define SHIFT_COUNT_TRUNCATED 1
208:
209:
210: #define FASTEST_ALIGNMENT 32
211:
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))
216:
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))
222:
223: /*
224: * disable a few things picked up from svr3.h
225: */
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
236:
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 \
242: BSS_SECTION_FUNCTION
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.