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 Free Software Foundation, Inc.
5 Written by David V. Henkel-Wallace (gumby@cygnus.com)
7 This file is part of GCC.
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 2, or (at your option)
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.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING. If not, write to
21 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA. */
24 #define TARGET_VERSION fprintf (stderr, " (x86 NetWare)");
27 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
32 /* Kinda useless, but what the hell */
34 #define LINK_SPEC "%{h*} %{V} %{v:%{!V:-V}} \
39 #define STARTFILE_SPEC ""
42 #define ENDFILE_SPEC ""
44 #undef RELATIVE_PREFIX_NOT_LINKDIR
47 #define TARGET_OS_CPP_BUILTINS() \
50 builtin_define_std ("IAPX386"); \
51 builtin_define ("_M_IX86=300"); \
52 builtin_define ("__netware__"); \
53 builtin_assert ("system=netware"); \
54 builtin_define ("__ELF__"); \
55 builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
56 builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
57 builtin_define ("__fastcall=__attribute__((__fastcall__))"); \
60 builtin_define ("_cdecl=__attribute__((__cdecl__))"); \
61 builtin_define ("_stdcall=__attribute__((__stdcall__))"); \
62 builtin_define ("_fastcall=__attribute__((__fastcall__))"); \
67 #undef TARGET_CPU_DEFAULT
68 #define TARGET_CPU_DEFAULT TARGET_CPU_DEFAULT_pentium4
70 /* By default, target has a 80387, uses IEEE compatible arithmetic,
71 returns float values in the 387, and uses MSVC bit field layout. */
72 #undef TARGET_SUBTARGET_DEFAULT
73 #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | \
74 MASK_FLOAT_RETURNS | MASK_MS_BITFIELD_LAYOUT)
77 #define MATH_LIBRARY ""
79 /* Align doubles and long-longs in structures on qword boundaries. */
80 #undef BIGGEST_FIELD_ALIGNMENT
81 #define BIGGEST_FIELD_ALIGNMENT 64
83 #undef DEFAULT_PCC_STRUCT_RETURN
84 #define DEFAULT_PCC_STRUCT_RETURN 0
86 /* Implicit arguments pointing to aggregate return values are to be
87 removed by the caller. */
88 #undef KEEP_AGGREGATE_RETURN_POINTER
89 #define KEEP_AGGREGATE_RETURN_POINTER 1
91 #undef DBX_REGISTER_NUMBER
92 #define DBX_REGISTER_NUMBER(n) (svr4_dbx_register_map[n])
94 /* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop). */
95 #define HANDLE_PRAGMA_PACK_PUSH_POP
97 /* Default structure packing is 1-byte. */
98 #define TARGET_DEFAULT_PACK_STRUCT 1
101 #define WCHAR_TYPE "short unsigned int"
103 #undef WCHAR_TYPE_SIZE
104 #define WCHAR_TYPE_SIZE 16
107 #define WINT_TYPE "int"
109 /* A C statement (sans semicolon) to output to the stdio stream
110 FILE the assembler definition of uninitialized global DECL named
111 NAME whose size is SIZE bytes and alignment is ALIGN bytes.
112 Try to use asm_output_aligned_bss to implement this macro. */
114 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
115 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
117 /* Handle special EH pointer encodings. Absolute, pc-relative, and
118 indirect are handled automatically. */
119 #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
121 if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
123 fputs (ASM_LONG, FILE); \
124 assemble_name (FILE, XSTR (ADDR, 0)); \
125 fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
130 /* there is no TLS support in NLMs/on NetWare */
133 #define HAS_INIT_SECTION
134 #undef INIT_SECTION_ASM_OP
136 #define CTOR_LISTS_DEFINED_EXTERNALLY
138 #undef READONLY_DATA_SECTION_ASM_OP
139 #define READONLY_DATA_SECTION_ASM_OP ".section\t.rodata"
141 /* Define this macro if references to a symbol must be treated
142 differently depending on something about the variable or
143 function named by the symbol (such as what section it is in).
145 On i386 running NetWare, modify the assembler name with an undercore (_)
146 prefix and a suffix consisting of an atsign (@) followed by a string of
147 digits that represents the number of bytes of arguments passed to the
148 function, if it has the attribute STDCALL. Alternatively, if it has the
149 REGPARM attribute, prefix it with an underscore (_), a digit representing
150 the number of registers used, and an atsign (@). */
151 void i386_nlm_encode_section_info (tree
, rtx
, int);
152 const char *i386_nlm_strip_name_encoding (const char *);
153 #undef TARGET_ENCODE_SECTION_INFO
154 #define TARGET_ENCODE_SECTION_INFO i386_nlm_encode_section_info
155 #undef TARGET_STRIP_NAME_ENCODING
156 #define TARGET_STRIP_NAME_ENCODING i386_nlm_strip_name_encoding