0
|
1 /* Core target definitions for GCC for Intel 80x86 running Netware.
|
|
2 and using dwarf for the debugging format.
|
|
3 Copyright (C) 1993, 1994, 2004, 2007, 2008 Free Software Foundation, Inc.
|
|
4
|
|
5 Written by David V. Henkel-Wallace (gumby@cygnus.com)
|
|
6
|
|
7 This file is part of GCC.
|
|
8
|
|
9 GCC is free software; you can redistribute it and/or modify
|
|
10 it under the terms of the GNU General Public License as published by
|
|
11 the Free Software Foundation; either version 3, or (at your option)
|
|
12 any later version.
|
|
13
|
|
14 GCC is distributed in the hope that it will be useful,
|
|
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17 GNU General Public License for more details.
|
|
18
|
|
19 You should have received a copy of the GNU General Public License
|
|
20 along with GCC; see the file COPYING3. If not see
|
|
21 <http://www.gnu.org/licenses/>. */
|
|
22
|
|
23 #define TARGET_VERSION fprintf (stderr, " (x86 NetWare)");
|
|
24
|
|
25 #undef CPP_SPEC
|
|
26 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
|
|
27
|
|
28 #undef LIB_SPEC
|
|
29 #define LIB_SPEC ""
|
|
30
|
|
31 /* Kinda useless, but what the hell */
|
|
32 #undef LINK_SPEC
|
|
33 #define LINK_SPEC "%{h*} %{V} %{v:%{!V:-V}} \
|
|
34 %{b} \
|
|
35 %{Qy:} %{!Qn:-Qy}"
|
|
36
|
|
37 #undef STARTFILE_SPEC
|
|
38 #define STARTFILE_SPEC ""
|
|
39
|
|
40 #undef ENDFILE_SPEC
|
|
41 #define ENDFILE_SPEC ""
|
|
42
|
|
43 #undef RELATIVE_PREFIX_NOT_LINKDIR
|
|
44 #undef LIBGCC_SPEC
|
|
45
|
|
46 #define TARGET_OS_CPP_BUILTINS() \
|
|
47 do \
|
|
48 { \
|
|
49 builtin_define_std ("IAPX386"); \
|
|
50 builtin_define ("_M_IX86=300"); \
|
|
51 builtin_define ("__netware__"); \
|
|
52 builtin_assert ("system=netware"); \
|
|
53 builtin_define ("__ELF__"); \
|
|
54 builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
|
|
55 builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
|
|
56 builtin_define ("__fastcall=__attribute__((__fastcall__))"); \
|
|
57 if (!flag_iso) \
|
|
58 { \
|
|
59 builtin_define ("_cdecl=__attribute__((__cdecl__))"); \
|
|
60 builtin_define ("_stdcall=__attribute__((__stdcall__))"); \
|
|
61 builtin_define ("_fastcall=__attribute__((__fastcall__))"); \
|
|
62 } \
|
|
63 } \
|
|
64 while (0)
|
|
65
|
|
66 #undef TARGET_CPU_DEFAULT
|
|
67 #define TARGET_CPU_DEFAULT TARGET_CPU_DEFAULT_pentium4
|
|
68
|
|
69 /* By default, target has a 80387, uses IEEE compatible arithmetic,
|
|
70 returns float values in the 387, and uses MSVC bit field layout. */
|
|
71 #undef TARGET_SUBTARGET_DEFAULT
|
|
72 #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | \
|
|
73 MASK_FLOAT_RETURNS | MASK_ALIGN_DOUBLE | MASK_MS_BITFIELD_LAYOUT)
|
|
74
|
|
75 /* Sometimes certain combinations of command options do not make
|
|
76 sense on a particular target machine. You can define a macro
|
|
77 `OVERRIDE_OPTIONS' to take account of this. This macro, if
|
|
78 defined, is executed once just after all the command options have
|
|
79 been parsed.
|
|
80
|
|
81 Don't use this macro to turn on various extra optimizations for
|
|
82 `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */
|
|
83 #undef OVERRIDE_OPTIONS
|
|
84 extern void netware_override_options (void);
|
|
85 #define OVERRIDE_OPTIONS netware_override_options ()
|
|
86
|
|
87 #undef MATH_LIBRARY
|
|
88 #define MATH_LIBRARY ""
|
|
89
|
|
90 /* Align doubles and long-longs in structures on qword boundaries. */
|
|
91 #undef BIGGEST_FIELD_ALIGNMENT
|
|
92 #define BIGGEST_FIELD_ALIGNMENT 64
|
|
93
|
|
94 #undef DEFAULT_PCC_STRUCT_RETURN
|
|
95 #define DEFAULT_PCC_STRUCT_RETURN 0
|
|
96
|
|
97 /* Implicit arguments pointing to aggregate return values are to be
|
|
98 removed by the caller. */
|
|
99 #undef KEEP_AGGREGATE_RETURN_POINTER
|
|
100 #define KEEP_AGGREGATE_RETURN_POINTER 1
|
|
101
|
|
102 #undef DBX_REGISTER_NUMBER
|
|
103 #define DBX_REGISTER_NUMBER(n) (svr4_dbx_register_map[n])
|
|
104
|
|
105 /* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop). */
|
|
106 #define HANDLE_PRAGMA_PACK_PUSH_POP
|
|
107
|
|
108 /* Default structure packing is 1-byte. */
|
|
109 #define TARGET_DEFAULT_PACK_STRUCT 1
|
|
110
|
|
111 #undef WCHAR_TYPE
|
|
112 #define WCHAR_TYPE "short unsigned int"
|
|
113
|
|
114 #undef WCHAR_TYPE_SIZE
|
|
115 #define WCHAR_TYPE_SIZE 16
|
|
116
|
|
117 #undef WINT_TYPE
|
|
118 #define WINT_TYPE "int"
|
|
119
|
|
120 /* A C statement (sans semicolon) to output to the stdio stream
|
|
121 FILE the assembler definition of uninitialized global DECL named
|
|
122 NAME whose size is SIZE bytes and alignment is ALIGN bytes.
|
|
123 Try to use asm_output_aligned_bss to implement this macro. */
|
|
124
|
|
125 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
|
|
126 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
|
|
127
|
|
128 /* Handle special EH pointer encodings. Absolute, pc-relative, and
|
|
129 indirect are handled automatically. */
|
|
130 #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
|
|
131 do { \
|
|
132 if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
|
|
133 { \
|
|
134 fputs (ASM_LONG, FILE); \
|
|
135 assemble_name (FILE, XSTR (ADDR, 0)); \
|
|
136 fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
|
|
137 goto DONE; \
|
|
138 } \
|
|
139 } while (0)
|
|
140
|
|
141 /* there is no TLS support in NLMs/on NetWare */
|
|
142 #undef HAVE_AS_TLS
|
|
143
|
|
144 #define HAS_INIT_SECTION
|
|
145 #undef INIT_SECTION_ASM_OP
|
|
146
|
|
147 #define CTOR_LISTS_DEFINED_EXTERNALLY
|
|
148
|
|
149 #undef READONLY_DATA_SECTION_ASM_OP
|
|
150 #define READONLY_DATA_SECTION_ASM_OP ".section\t.rodata"
|
|
151
|
|
152 /* Define this macro if references to a symbol must be treated
|
|
153 differently depending on something about the variable or
|
|
154 function named by the symbol (such as what section it is in).
|
|
155
|
|
156 On i386 running NetWare, modify the assembler name with an underscore (_)
|
|
157 or atsign (@) prefix and a suffix consisting of an atsign (@) followed by
|
|
158 a string of digits that represents the number of bytes of arguments passed
|
|
159 to the function, if it has the attribute STDCALL. Alternatively, if it has
|
|
160 the REGPARM attribute, prefix it with an underscore (_), a digit
|
|
161 representing the number of registers used, and an atsign (@). */
|
|
162 void i386_nlm_encode_section_info (tree, rtx, int);
|
|
163 extern tree i386_nlm_mangle_decl_assembler_name (tree, tree);
|
|
164 const char *i386_nlm_strip_name_encoding (const char *);
|
|
165 #define SUBTARGET_ENCODE_SECTION_INFO i386_nlm_encode_section_info
|
|
166 #define TARGET_MANGLE_DECL_ASSEMBLER_NAME i386_nlm_mangle_decl_assembler_name
|
|
167 #undef TARGET_STRIP_NAME_ENCODING
|
|
168 #define TARGET_STRIP_NAME_ENCODING i386_nlm_strip_name_encoding
|