1 /* Target definitions for GCC for Intel 80386 using ELF
2 Copyright (C) 1988, 1991, 1995, 2000, 2001, 2002, 2007, 2008, 2010, 2011
3 Free Software Foundation, Inc.
5 Derived from sysv4.h written by Ron Guilmette (rfg@netcom.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 3, 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 COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 /* Use stabs instead of DWARF debug format. */
24 #undef PREFERRED_DEBUGGING_TYPE
25 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
27 /* The ELF ABI for the i386 says that records and unions are returned
30 #define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \
31 (TYPE_MODE (TYPE) == BLKmode \
32 || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8))
37 #define ENDFILE_SPEC "crtend.o%s"
39 #define STARTFILE_SPEC "%{!shared: \
41 %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
44 #undef DBX_REGISTER_NUMBER
45 #define DBX_REGISTER_NUMBER(n) \
46 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
48 /* The routine used to output sequences of byte values. We use a special
49 version of this for most svr4 targets because doing so makes the
50 generated assembly code more compact (and thus faster to assemble)
51 as well as more readable. Note that if we find subparts of the
52 character sequence which end with NUL (and which are shorter than
53 STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING. */
55 #undef ASM_OUTPUT_ASCII
56 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
59 const unsigned char *_ascii_bytes = \
60 (const unsigned char *) (STR); \
61 const unsigned char *limit = _ascii_bytes + (LENGTH); \
62 unsigned bytes_in_chunk = 0; \
63 for (; _ascii_bytes < limit; _ascii_bytes++) \
65 const unsigned char *p; \
66 if (bytes_in_chunk >= 64) \
68 fputc ('\n', (FILE)); \
71 for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \
73 if (p < limit && (p - _ascii_bytes) <= (long) STRING_LIMIT) \
75 if (bytes_in_chunk > 0) \
77 fputc ('\n', (FILE)); \
80 ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \
85 if (bytes_in_chunk == 0) \
86 fputs (ASM_BYTE, (FILE)); \
88 fputc (',', (FILE)); \
89 fprintf ((FILE), "0x%02x", *_ascii_bytes); \
90 bytes_in_chunk += 5; \
93 if (bytes_in_chunk > 0) \
94 fputc ('\n', (FILE)); \
98 #define LOCAL_LABEL_PREFIX "."
100 /* Switch into a generic section. */
101 #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
103 #undef BSS_SECTION_ASM_OP
104 #define BSS_SECTION_ASM_OP "\t.section\t.bss"
106 #undef ASM_OUTPUT_ALIGNED_BSS
107 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
108 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)