]> gcc.gnu.org Git - gcc.git/blob - gcc/config/i386/osfrose.h
Initial revision
[gcc.git] / gcc / config / i386 / osfrose.h
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 "%{.S: -D__LANGUAGE_ASSEMBLY__ \
52 -D_LANGUAGE_ASSEMBLY \
53 %{!ansi:-DLANGUAGE_ASSEMBLY}} \
54 %{!.S: -D__LANGUAGE_C__ \
55 -D_LANGUAGE_C \
56 %{!ansi:-DLANGUAGE_C}}"
57
58 #ifdef CC1_SPEC
59 #undef CC1_SPEC
60 #endif
61 #define CC1_SPEC ""
62
63 #ifdef ASM_SPEC
64 #undef ASM_SPEC
65 #endif
66 #define ASM_SPEC ""
67
68 #ifdef LINK_SPEC
69 #undef LINK_SPEC
70 #endif
71 #define LINK_SPEC "%{v*: -v} \
72 %{pic-none: -noshrlib} %{noshrlib} \
73 %{!pic-none: -warn_nopic} \
74 %{nostdlib} %{glue}"
75
76 #ifdef LIB_SPEC
77 #undef LIB_SPEC
78 #endif
79
80 /* For now, force static libraries instead of shared, but do so that
81 does not use -noshrlib, since the old linker does not provide it. */
82
83 #define LIB_SPEC "%{!pic-none: %{!pic-lib: -L/usr/ccs/lib }} -lc"
84
85 #ifdef LIBG_SPEC
86 #undef LIBG_SPEC
87 #endif
88 #define LIBG_SPEC ""
89
90 #ifdef STARTFILE_SPEC
91 #undef STARTFILE_SPEC
92 #endif
93 #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
94
95 #ifdef MACHINE_TYPE
96 #undef MACHINE_TYPE
97 #endif
98
99 #define MACHINE_TYPE ((!TARGET_486) ? "80386 running OSF/1 with OSF/rose objects" : \
100 "80486 running OSF/1 with OSF/rose objects")
101
102 #if 0
103 #ifdef MD_EXEC_PREFIX
104 #undef MD_EXEC_PREFIX
105 #endif
106 #define MD_EXEC_PREFIX "/usr/ccs/gcc/"
107
108 #ifdef MD_STARTFILE_PREFIX
109 #undef MD_STARTFILE_PREFIX
110 #endif
111 #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
112 #endif
113
114 /* Tell final.c we don't need a label passed to mcount. */
115 #define NO_PROFILE_DATA
116
117 #undef FUNCTION_PROFILER
118 #define FUNCTION_PROFILER(FILE, LABELNO) fprintf (FILE, "\tcall _mcount\n")
119
120 /* Tell collect that the object format is OSF/rose. */
121 #define OBJECT_FORMAT_ROSE
122 \f
123
124 /* Defines to be able to build gnulib with GCC. */
125
126 #define perform_udivsi3(a,b) \
127 { \
128 register int dx asm("dx"); \
129 register int ax asm("ax"); \
130 \
131 dx = 0; \
132 ax = a; \
133 asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx)); \
134 return ax; \
135 }
136
137 #define perform_divsi3(a,b) \
138 { \
139 register int dx asm("dx"); \
140 register int ax asm("ax"); \
141 \
142 ax = a; \
143 asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
144 return ax; \
145 }
146
147 #define perform_umodsi3(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 dx; \
156 }
157
158 #define perform_modsi3(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 dx; \
166 }
167
168 #define perform_fix_truncdfsi2(a) \
169 { \
170 auto unsigned short ostatus; \
171 auto unsigned short nstatus; \
172 auto int ret; \
173 \
174 &ostatus; /* guarantee these land in memory */ \
175 &nstatus; \
176 &ret; \
177 \
178 asm volatile ("fnstcw %0" : "=m" (ostatus)); \
179 nstatus = ostatus | 0x0c00; \
180 asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus)); \
181 asm volatile ("fldl %0" : /* no outputs */ : "m" (a)); \
182 asm volatile ("fistpl %0" : "=m" (ret)); \
183 asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus)); \
184 \
185 return ret; \
186 }
This page took 0.050775 seconds and 6 git commands to generate.