1169689Skan/* Definitions for LynxOS on i386. 2169689Skan Copyright (C) 1993, 1995, 1996, 2002, 2004, 2005 3169689Skan Free Software Foundation, Inc. 418334Speter 5132718SkanThis file is part of GCC. 618334Speter 7132718SkanGCC is free software; you can redistribute it and/or modify 818334Speterit under the terms of the GNU General Public License as published by 918334Speterthe Free Software Foundation; either version 2, or (at your option) 1018334Speterany later version. 1118334Speter 12132718SkanGCC is distributed in the hope that it will be useful, 1318334Speterbut WITHOUT ANY WARRANTY; without even the implied warranty of 1418334SpeterMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1518334SpeterGNU General Public License for more details. 1618334Speter 1718334SpeterYou should have received a copy of the GNU General Public License 18132718Skanalong with GCC; see the file COPYING. If not, write to 19169689Skanthe Free Software Foundation, 51 Franklin Street, Fifth Floor, 20169689SkanBoston, MA 02110-1301, USA. */ 2118334Speter 22169689Skan#define TARGET_VERSION fputs (" (i386/LynxOS)", stderr); 2318334Speter 24117395Skan#define TARGET_OS_CPP_BUILTINS() \ 25117395Skan do \ 26117395Skan { \ 27169689Skan builtin_define ("__LITTLE_ENDIAN__"); \ 28169689Skan builtin_define ("__x86__"); \ 29117395Skan } \ 30117395Skan while (0) 3118334Speter 32169689Skan/* The svr4 ABI for the i386 says that records and unions are returned 33169689Skan in memory. */ 3418334Speter 35169689Skan#define DEFAULT_PCC_STRUCT_RETURN 1 3618334Speter 37169689Skan/* BSS_SECTION_ASM_OP gets defined i386/unix.h. */ 3818334Speter 39169689Skan#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ 40169689Skan asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) 4118334Speter 42169689Skan/* LynxOS's GDB counts the floating point registers from 16. */ 43117395Skan 44169689Skan#undef DBX_REGISTER_NUMBER 45169689Skan#define DBX_REGISTER_NUMBER(n) \ 46169689Skan (TARGET_64BIT ? dbx64_register_map[n] \ 47169689Skan : (n) == 0 ? 0 \ 48169689Skan : (n) == 1 ? 2 \ 49169689Skan : (n) == 2 ? 1 \ 50169689Skan : (n) == 3 ? 3 \ 51169689Skan : (n) == 4 ? 6 \ 52169689Skan : (n) == 5 ? 7 \ 53169689Skan : (n) == 6 ? 5 \ 54169689Skan : (n) == 7 ? 4 \ 55169689Skan : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n) + 8 \ 56169689Skan : (-1)) 57169689Skan 58169689Skan/* A C statement to output to the stdio stream FILE an assembler 59169689Skan command to advance the location counter to a multiple of 1<<LOG 60169689Skan bytes if it is within MAX_SKIP bytes. 61117395Skan 62169689Skan This is used to align code labels according to Intel recommendations. */ 63117395Skan 64169689Skan#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN 65169689Skan#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ 66169689Skan do { \ 67169689Skan if ((LOG) != 0) { \ 68169689Skan if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 69169689Skan else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ 70169689Skan } \ 71169689Skan } while (0) 72169689Skan#endif 73117395Skan 74169689Skan/* Undefine SUBTARGET_EXTRA_SPECS it is empty anyway. We define it in 75169689Skan config/lynx.h. */ 76117395Skan 77169689Skan#undef SUBTARGET_EXTRA_SPECS 78117395Skan 79169689Skan/* Undefine the definition from att.h to enable our default. */ 80117395Skan 81169689Skan#undef ASM_OUTPUT_ALIGN 82169689Skan 83169689Skan/* Undefine the definition from elfos.h to enable our default. */ 84169689Skan 85169689Skan#undef PREFERRED_DEBUGGING_TYPE 86169689Skan 87169689Skan/* The file i386.c defines TARGET_HAVE_TLS unconditionally if 88169689Skan HAVE_AS_TLS is defined. HAVE_AS_TLS is defined as gas support for 89169689Skan TLS is detected by configure. We undefine it here. */ 90169689Skan 91169689Skan#undef HAVE_AS_TLS 92