|
|
1.1 root 1: /* Definitions of target machine for GNU compiler.
2: Encore Multimax (OSF/1 with OSF/rose) version.
3: Copyright (C) 1991 Free Software Foundation, Inc.
4:
5: This file is part of GNU CC.
6:
7: GNU CC is free software; you can redistribute it and/or modify
8: it under the terms of the GNU General Public License as published by
9: the Free Software Foundation; either version 2, or (at your option)
10: any later version.
11:
12: GNU CC is distributed in the hope that it will be useful,
13: but WITHOUT ANY WARRANTY; without even the implied warranty of
14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: GNU General Public License for more details.
16:
17: You should have received a copy of the GNU General Public License
18: along with GNU CC; see the file COPYING. If not, write to
19: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20:
21: #include "i386gas.h"
22:
23: #define OSF_OS
24:
25: /* Use a more friendly abort which prints internal compiler error,
26: rather than just dumping core. */
27:
28: #ifndef abort
29: #define abort fancy_abort
30: #endif
31:
32: /* Prefix that appears before all global/static identifiers, except for
33: temporary labels. */
34:
35: #define IDENTIFIER_PREFIX "_"
36:
37: /* Suffix that appears after all global/static identifiers, except for
38: temporary labels. */
39:
40: #define IDENTIFIER_SUFFIX ""
41:
42: /* Change default predefines. */
43: #ifdef CPP_PREDEFINES
44: #undef CPP_PREDEFINES
45: #endif
46: #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Di386"
47:
48: #ifdef CPP_SPEC
49: #undef CPP_SPEC
50: #endif
51: #define CPP_SPEC "\
52: %{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
53: %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
54: %{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
55: %{.C: -D__LANGUAGE_C_PLUS_PLUS} \
56: %{.m: -D__LANGUAGE_OBJECTIVE_C} \
57: %{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
58:
59: #ifdef CC1_SPEC
60: #undef CC1_SPEC
61: #endif
62: #define CC1_SPEC ""
63:
64: #ifndef CC1PLUS_SPEC
65: #define CC1PLUS_SPEC "%{!fgnu-binutils: -fno-gnu-binutils}"
66: #endif
67:
68: #ifdef ASM_SPEC
69: #undef ASM_SPEC
70: #endif
71: #define ASM_SPEC ""
72:
73: #ifdef LINK_SPEC
74: #undef LINK_SPEC
75: #endif
76: #define LINK_SPEC "%{v*: -v} \
77: %{pic-none: -noshrlib} %{noshrlib} \
78: %{!pic-none: -warn_nopic} \
79: %{nostdlib} %{glue}"
80:
81: #ifdef LIB_SPEC
82: #undef LIB_SPEC
83: #endif
84:
85: /* For now, force static libraries instead of shared, but do so that
86: does not use -noshrlib, since the old linker does not provide it. */
87:
88: #define LIB_SPEC "%{!pic-none: %{!pic-lib: -L/usr/ccs/lib }} -lc"
89:
90: #ifdef LIBG_SPEC
91: #undef LIBG_SPEC
92: #endif
93: #define LIBG_SPEC ""
94:
95: #ifdef STARTFILE_SPEC
96: #undef STARTFILE_SPEC
97: #endif
98: #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
99:
100: #ifdef MACHINE_TYPE
101: #undef MACHINE_TYPE
102: #endif
103:
104: #define MACHINE_TYPE ((!TARGET_486) ? "80386 running OSF/1 with OSF/rose objects" : \
105: "80486 running OSF/1 with OSF/rose objects")
106:
107: #ifdef MD_EXEC_PREFIX
108: #undef MD_EXEC_PREFIX
109: #endif
110: #define MD_EXEC_PREFIX "/usr/ccs/gcc/"
111:
112: #ifdef MD_STARTFILE_PREFIX
113: #undef MD_STARTFILE_PREFIX
114: #endif
115: #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
116:
117: /* Tell final.c we don't need a label passed to mcount. */
118: #define NO_PROFILE_DATA
119:
120: #undef FUNCTION_PROFILER
121: #define FUNCTION_PROFILER(FILE, LABELNO) fprintf (FILE, "\tcall _mcount\n")
122:
123: /* Tell collect that the object format is OSF/rose. */
124: #define OBJECT_FORMAT_ROSE
125:
126: /* Use atexit for static constructors/destructors, instead of defining
127: our own exit function. */
128: #define HAVE_ATEXIT
129:
130: /* If defined, a C string constant for the assembler operation to
131: identify the following data as initialization code. If not
132: defined, GNU CC will assume such a section does not exist.
133:
134: OSF/rose doesn't presently have an init section, but this macro
135: also controls whether or not __main is called from main, collect
136: will however build an initialization section directly. */
137:
138: #define INIT_SECTION_ASM_OP ".init"
139:
140: /* Define this macro meaning that gcc should find the library 'libgcc.a'
141: by hand, rather than passing the argeument '-lgcc' to tell the linker
142: to do the search */
143: #define LINK_LIBGCC_SPECIAL
144:
145: /* Defines to be able to build libgcc.a with GCC. */
146:
147: #define perform_udivsi3(a,b) \
148: { \
149: register int dx asm("dx"); \
150: register int ax asm("ax"); \
151: \
152: dx = 0; \
153: ax = a; \
154: asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx)); \
155: return ax; \
156: }
157:
158: #define perform_divsi3(a,b) \
159: { \
160: register int dx asm("dx"); \
161: register int ax asm("ax"); \
162: \
163: ax = a; \
164: asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
165: return ax; \
166: }
167:
168: #define perform_umodsi3(a,b) \
169: { \
170: register int dx asm("dx"); \
171: register int ax asm("ax"); \
172: \
173: dx = 0; \
174: ax = a; \
175: asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx)); \
176: return dx; \
177: }
178:
179: #define perform_modsi3(a,b) \
180: { \
181: register int dx asm("dx"); \
182: register int ax asm("ax"); \
183: \
184: ax = a; \
185: asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
186: return dx; \
187: }
188:
189: #define perform_fix_truncdfsi2(a) \
190: { \
191: auto unsigned short ostatus; \
192: auto unsigned short nstatus; \
193: auto int ret; \
194: \
195: &ostatus; /* guarantee these land in memory */ \
196: &nstatus; \
197: &ret; \
198: \
199: asm volatile ("fnstcw %0" : "=m" (ostatus)); \
200: nstatus = ostatus | 0x0c00; \
201: asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus)); \
202: asm volatile ("fldl %0" : /* no outputs */ : "m" (a)); \
203: asm volatile ("fistpl %0" : "=m" (ret)); \
204: asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus)); \
205: \
206: return ret; \
207: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.