home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / gcc-2.3.3-src.lha / GNU / src / amiga / gcc-2.3.3 / config / aix386.h < prev    next >
C/C++ Source or Header  |  1994-02-06  |  3KB  |  112 lines

  1. /* Definitions for IBM PS2 running AIX/386.
  2.    From: Minh Tran-Le <TRANLE@intellicorp.com>
  3.    Copyright (C) 1988 Free Software Foundation, Inc.
  4.  
  5. This file is part of GNU CC.
  6.  
  7. GNU CC is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2, or (at your option)
  10. any later version.
  11.  
  12. GNU CC is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with GNU CC; see the file COPYING.  If not, write to
  19. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21.  
  22. #include "i386.h"
  23.  
  24. /* Get the generic definitions for system V.3.  */
  25.  
  26. #include "svr3.h"
  27.  
  28. /* Use the ATT assembler syntax.
  29.    This overrides at least one macro (ASM_OUTPUT_LABELREF) from svr3.h.  */
  30.  
  31. #include "att386.h"
  32.  
  33. /* Use crt1.o as a startup file and crtn.o as a closing file.  */
  34.  
  35. #define STARTFILE_SPEC  \
  36.   "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s"
  37.  
  38. #define LIB_SPEC "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} -lc \
  39.   crtend.o%s crtn.o%s"
  40.  
  41. /* Special flags for the linker.  I don't know what they do.  */
  42.  
  43. #define LINK_SPEC "%{K} %{!K:-K} %{T*} %{z:-lm}"
  44.  
  45. /* Specify predefined symbols in preprocessor.  */
  46.  
  47. #define CPP_PREDEFINES "-D_I386 -Di386 -DAIX -D_AIX"
  48.  
  49. /* special flags for the aix assembler to generate the short form for all
  50.    qualifying forward reference */
  51.  
  52. #define ASM_SPEC "-s2"
  53.  
  54. #undef ASM_FILE_START
  55. #define ASM_FILE_START(FILE)                     \
  56.   do { fprintf (FILE, "\t.file\t\"%s\"\n", dump_base_name);    \
  57.        if (optimize)                        \
  58.           ASM_FILE_START_1 (FILE);                 \
  59.        else                            \
  60.           fprintf (FILE, "\t.noopt\n");                \
  61.      } while (0)
  62.  
  63. /* This was suggested, but it shouldn't be right for DBX output. -- RMS
  64.    #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */
  65.  
  66. /* Writing `int' for a bitfield forces int alignment for the structure.  */
  67.  
  68. #define PCC_BITFIELD_TYPE_MATTERS 1
  69.  
  70. #if 0
  71. /* Don't write a `.optim' pseudo; this assembler
  72.    is said to have a bug when .optim is used.  */
  73.  
  74. #undef ASM_FILE_START_1
  75. #define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.noopt\n");
  76. #endif
  77.  
  78. /* Output assembler code to FILE to increment profiler label # LABELNO
  79.    for profiling a function entry.  */
  80.  
  81. #undef FUNCTION_PROFILER
  82. #define FUNCTION_PROFILER(FILE, LABELNO)  \
  83.    fprintf (FILE, "\tleal %sP%d,%%eax\n\tcall mcount\n", LPREFIX, (LABELNO));
  84.  
  85. /* Note that using bss_section here caused errors
  86.    in building shared libraries on system V.3.
  87.    but AIX 1.2 does not have yet shareable libraries on PS2 */
  88. #undef ASM_OUTPUT_LOCAL
  89. #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
  90.   (bss_section (),                    \
  91.    ASM_OUTPUT_LABEL ((FILE), (NAME)),            \
  92.    fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)))
  93.  
  94. /* Define a few machine-specific details of the implementation of
  95.    constructors.  */
  96.  
  97. #undef INIT_SECTION_ASM_OP
  98. #define INIT_SECTION_ASM_OP     ".section .init,\"x\""
  99.  
  100. #define CTOR_LIST_BEGIN                \
  101.   asm (INIT_SECTION_ASM_OP);            \
  102.   asm ("pushl $0")
  103. #define CTOR_LIST_END CTOR_LIST_BEGIN
  104.  
  105. #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)    \
  106.   do {                        \
  107.     init_section ();                \
  108.     fprintf (FILE, "\tpushl $");        \
  109.     assemble_name (FILE, NAME);            \
  110.     fprintf (FILE, "\n");            \
  111.   } while (0)
  112.