1 /* Target definitions for GCC for Intel 80386 using ELF 2 Copyright (C) 1988-2018 Free Software Foundation, Inc. 3 4 Derived from sysv4.h written by Ron Guilmette (rfg@netcom.com). 5 6 This file is part of GCC. 7 8 GCC is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 3, or (at your option) 11 any later version. 12 13 GCC is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with GCC; see the file COPYING3. If not see 20 <http://www.gnu.org/licenses/>. */ 21 22 /* The ELF ABI for the i386 says that records and unions are returned 23 in memory. */ 24 25 #define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \ 26 (TYPE_MODE (TYPE) == BLKmode \ 27 || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8)) 28 29 #undef CPP_SPEC 30 #define CPP_SPEC "" 31 32 #define ENDFILE_SPEC "crtend.o%s" 33 34 #define STARTFILE_SPEC "%{!shared: \ 35 %{!symbolic: \ 36 %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\ 37 crtbegin.o%s" 38 39 #undef DBX_REGISTER_NUMBER 40 #define DBX_REGISTER_NUMBER(n) \ 41 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) 42 43 /* The routine used to output sequences of byte values. We use a special 44 version of this for most svr4 targets because doing so makes the 45 generated assembly code more compact (and thus faster to assemble) 46 as well as more readable. Note that if we find subparts of the 47 character sequence which end with NUL (and which are shorter than 48 ELF_STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING. */ 49 50 #undef ASM_OUTPUT_ASCII 51 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \ 52 do \ 53 { \ 54 const unsigned char *_ascii_bytes = \ 55 (const unsigned char *) (STR); \ 56 const unsigned char *limit = _ascii_bytes + (LENGTH); \ 57 unsigned bytes_in_chunk = 0; \ 58 for (; _ascii_bytes < limit; _ascii_bytes++) \ 59 { \ 60 const unsigned char *p; \ 61 if (bytes_in_chunk >= 64) \ 62 { \ 63 fputc ('\n', (FILE)); \ 64 bytes_in_chunk = 0; \ 65 } \ 66 for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \ 67 continue; \ 68 if (p < limit && (p - _ascii_bytes) <= (long) ELF_STRING_LIMIT) \ 69 { \ 70 if (bytes_in_chunk > 0) \ 71 { \ 72 fputc ('\n', (FILE)); \ 73 bytes_in_chunk = 0; \ 74 } \ 75 ASM_OUTPUT_LIMITED_STRING ((FILE), (const char *) _ascii_bytes); \ 76 _ascii_bytes = p; \ 77 } \ 78 else \ 79 { \ 80 if (bytes_in_chunk == 0) \ 81 fputs (ASM_BYTE, (FILE)); \ 82 else \ 83 fputc (',', (FILE)); \ 84 fprintf ((FILE), "0x%02x", *_ascii_bytes); \ 85 bytes_in_chunk += 5; \ 86 } \ 87 } \ 88 if (bytes_in_chunk > 0) \ 89 fputc ('\n', (FILE)); \ 90 } \ 91 while (0) 92 93 #define LOCAL_LABEL_PREFIX "." 94 95 /* Switch into a generic section. */ 96 #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section 97 98 #undef BSS_SECTION_ASM_OP 99 #define BSS_SECTION_ASM_OP "\t.section\t.bss" 100 101 #undef ASM_OUTPUT_ALIGNED_BSS 102 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ 103 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) 104