1/* Definitions for Intel x86 running Haiku 2 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 3 Free Software Foundation, Inc. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify 8it under the terms of the GNU General Public License as published by 9the Free Software Foundation; either version 2, or (at your option) 10any later version. 11 12GCC is distributed in the hope that it will be useful, 13but WITHOUT ANY WARRANTY; without even the implied warranty of 14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15GNU General Public License for more details. 16 17You should have received a copy of the GNU General Public License 18along with GCC; see the file COPYING. If not, write to 19the Free Software Foundation, 59 Temple Place - Suite 330, 20Boston, MA 02111-1307, USA. */ 21 22 23#undef ASM_COMMENT_START 24#define ASM_COMMENT_START " #" 25 26/* The SVR4 ABI for the i386 says that records and unions are returned 27 in memory. */ 28#undef DEFAULT_PCC_STRUCT_RETURN 29#define DEFAULT_PCC_STRUCT_RETURN 1 30 31#undef DBX_REGISTER_NUMBER 32#define DBX_REGISTER_NUMBER(n) \ 33 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) 34 35#define TARGET_OS_CPP_BUILTINS() \ 36 do \ 37 { \ 38 builtin_define ("__HAIKU__"); \ 39 builtin_define ("__INTEL__"); \ 40 builtin_define ("_X86_"); \ 41 builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ 42 builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ 43 builtin_define ("__STDC_ISO_10646__=201103L"); \ 44 builtin_assert ("system=haiku"); \ 45 } \ 46 while (0) 47 48/* Provide a LINK_SPEC appropriate for Haiku. Here we provide support 49 for the special GCC options -static and -shared, which allow us to 50 link things in one of these three modes by applying the appropriate 51 combinations of options at link-time. */ 52 53/* If ELF is the default format, we should not use /lib/elf. */ 54 55#undef LINK_SPEC 56#define LINK_SPEC "-m elf_i386_haiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}" 57 58/* A C statement (sans semicolon) to output to the stdio stream 59 FILE the assembler definition of uninitialized global DECL named 60 NAME whose size is SIZE bytes and alignment is ALIGN bytes. 61 Try to use asm_output_aligned_bss to implement this macro. */ 62 63#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ 64 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) 65 66/* A C statement to output to the stdio stream FILE an assembler 67 command to advance the location counter to a multiple of 1<<LOG 68 bytes if it is within MAX_SKIP bytes. 69 70 This is used to align code labels according to Intel recommendations. */ 71 72#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN 73#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ 74 if ((LOG)!=0) \ 75 if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 76 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)) 77#endif 78