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