|
|
1.1 ! root 1: /* Definitions for Intel 386 running system V. ! 2: Copyright (C) 1988 Free Software Foundation, Inc. ! 3: ! 4: This file is part of GNU CC. ! 5: ! 6: GNU CC is free software; you can redistribute it and/or modify ! 7: it under the terms of the GNU General Public License as published by ! 8: the Free Software Foundation; either version 2, or (at your option) ! 9: any later version. ! 10: ! 11: GNU CC is distributed in the hope that it will be useful, ! 12: but WITHOUT ANY WARRANTY; without even the implied warranty of ! 13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! 14: GNU General Public License for more details. ! 15: ! 16: You should have received a copy of the GNU General Public License ! 17: along with GNU CC; see the file COPYING. If not, write to ! 18: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ! 19: ! 20: ! 21: #include "i386/i386.h" ! 22: ! 23: /* Use default settings for system V.3. */ ! 24: ! 25: #include "svr3.h" ! 26: ! 27: /* Use the ATT assembler syntax. ! 28: This overrides at least one macro (ASM_OUTPUT_LABELREF) from svr3.h. */ ! 29: ! 30: #include "i386/att.h" ! 31: ! 32: /* Use crt1.o as a startup file and crtn.o as a closing file. */ ! 33: ! 34: #define STARTFILE_SPEC \ ! 35: "%{pg:gcrt1.o%s}%{!pg:%{posix:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}%{!posix:%{p:mcrt1.o%s}%{!p:crt1.o%s}}} crtbegin.o%s\ ! 36: %{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}" ! 37: ! 38: /* ??? There is a suggestion that -lg is needed here. ! 39: Does anyone know whether this is right? */ ! 40: #define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc crtend.o%s crtn.o%s" ! 41: ! 42: /* Specify predefined symbols in preprocessor. */ ! 43: ! 44: #define CPP_PREDEFINES "-Dunix -Di386 -Asystem(unix) -Asystem(svr3) -Acpu(i386) -Amachine(i386)" ! 45: ! 46: #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" ! 47: ! 48: /* Writing `int' for a bitfield forces int alignment for the structure. */ ! 49: ! 50: #define PCC_BITFIELD_TYPE_MATTERS 1 ! 51: ! 52: /* Don't write a `.optim' pseudo; this assembler doesn't handle them. */ ! 53: ! 54: #undef ASM_FILE_START_1 ! 55: #define ASM_FILE_START_1(FILE) ! 56: ! 57: /* longjmp may fail to restore the registers if called from the same ! 58: function that called setjmp. To compensate, the compiler avoids ! 59: putting variables in registers in functions that use both setjmp ! 60: and longjmp. */ ! 61: ! 62: #define NON_SAVING_SETJMP \ ! 63: (current_function_calls_setjmp && current_function_calls_longjmp) ! 64: ! 65: /* longjmp may fail to restore the stack pointer if the saved frame ! 66: pointer is the same as the caller's frame pointer. Requiring a frame ! 67: pointer in any function that calls setjmp or longjmp avoids this ! 68: problem, unless setjmp and longjmp are called from the same function. ! 69: Since a frame pointer will be required in such a function, it is OK ! 70: that the stack pointer is not restored. */ ! 71: ! 72: #undef FRAME_POINTER_REQUIRED ! 73: #define FRAME_POINTER_REQUIRED \ ! 74: (current_function_calls_setjmp || current_function_calls_longjmp) ! 75: ! 76: /* Modify ASM_OUTPUT_LOCAL slightly to test -msvr3-shlib. */ ! 77: #undef ASM_OUTPUT_LOCAL ! 78: #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ ! 79: do { \ ! 80: int align = exact_log2 (ROUNDED); \ ! 81: if (align > 2) align = 2; \ ! 82: if (TARGET_SVR3_SHLIB) \ ! 83: data_section (); \ ! 84: else \ ! 85: bss_section (); \ ! 86: ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \ ! 87: ASM_OUTPUT_LABEL ((FILE), (NAME)); \ ! 88: fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)); \ ! 89: } while (0) ! 90: ! 91: /* Define a few machine-specific details of the implementation of ! 92: constructors. ! 93: ! 94: The __CTORS_LIST__ goes in the .init section. Define CTOR_LIST_BEGIN ! 95: and CTOR_LIST_END to contribute to the .init section an instruction to ! 96: push a word containing 0 (or some equivalent of that). ! 97: ! 98: ASM_OUTPUT_CONSTRUCTOR should be defined to push the address of the ! 99: constructor. */ ! 100: ! 101: #undef INIT_SECTION_ASM_OP ! 102: #define INIT_SECTION_ASM_OP ".section .init,\"x\"" ! 103: ! 104: #define CTOR_LIST_BEGIN \ ! 105: asm (INIT_SECTION_ASM_OP); \ ! 106: asm ("pushl $0") ! 107: #define CTOR_LIST_END CTOR_LIST_BEGIN ! 108: ! 109: #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ ! 110: do { \ ! 111: init_section (); \ ! 112: fprintf (FILE, "\tpushl $"); \ ! 113: assemble_name (FILE, NAME); \ ! 114: fprintf (FILE, "\n"); \ ! 115: } while (0)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.