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 / pbb.h < prev    next >
C/C++ Source or Header  |  1994-02-06  |  5KB  |  155 lines

  1. /* Definitions of target machine for GNU compiler.
  2.  
  3.    Citicorp/TTI Unicom PBB version (using GAS with a %-register prefix)
  4.  
  5.    Copyright (C) 1987, 1988, 1990 Free Software Foundation, Inc.
  6.  
  7. This file is part of GNU CC.
  8.  
  9. GNU CC is free software; you can redistribute it and/or modify
  10. it under the terms of the GNU General Public License as published by
  11. the Free Software Foundation; either version 2, or (at your option)
  12. any later version.
  13.  
  14. GNU CC is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. GNU General Public License for more details.
  18.  
  19. You should have received a copy of the GNU General Public License
  20. along with GNU CC; see the file COPYING.  If not, write to
  21. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  22.  
  23. /* Note:   This config uses a version of gas with a postprocessing stage that
  24.    converts the output of gas to coff containing stab debug symbols.
  25.    (See vasta@apollo.com or mb@soldev.tti.com) */
  26.  
  27. #include "m68k.h"
  28.  
  29. /* See m68k.h.  5 means 68020 without 68881.  */
  30.  
  31. #define TARGET_DEFAULT 5
  32.  
  33. /* Every structure or union's size must be a multiple of 2 bytes.  */
  34. #define STRUCTURE_SIZE_BOUNDARY 16
  35.  
  36. /* Define __HAVE_68881__ in preprocessor if -m68881 is specified.
  37.    This will control the use of inline 68881 insns in certain macros.  */
  38.  
  39. #define CPP_SPEC "%{m68881:-D__HAVE_68881__}"
  40.  
  41. /* Names to predefine in the preprocessor for this target machine.  */
  42.  
  43. #define CPP_PREDEFINES "-Dm68k -Dunix -DUnicomPBB -Dmc68k -Dmc68020 -Dmc68k32"
  44.  
  45. /* We want DBX format for use with gdb under COFF.  */
  46.  
  47. #define DBX_DEBUGGING_INFO
  48.  
  49. /* Generate calls to memcpy, memcmp and memset.  */
  50.  
  51. #define TARGET_MEM_FUNCTIONS
  52.  
  53. /* -m68000 requires special flags to the assembler. */
  54.  
  55. #define ASM_SPEC \
  56.  " %{m68000:-mc68010}%{mc68000:-mc68010}"
  57.  
  58. /* we use /lib/libp/lib*  when profiling */
  59.  
  60. #define LIB_SPEC "%{p:-L/usr/lib/libp} %{pg:-L/usr/lib/libp} -lc"
  61.  
  62.  
  63. /* Use crt1.o as a startup file and crtn.o as a closing file.  */
  64. /*
  65.  * The loader directive file gcc.ifile defines how to merge the constructor 
  66.  * sections into the data section.  Also, since gas only puts out those 
  67.  * sections in response to N_SETT stabs, and does not (yet) have a 
  68.  * ".sections" directive, gcc.ifile also defines the list symbols 
  69.  * __DTOR_LIST__ and __CTOR_LIST__.
  70.  * 
  71.  * Finally, we must explicitly specify the file from libgcc.a that defines
  72.  * exit(), otherwise if the user specifies (for example) "-lc_s" on the 
  73.  * command line, the wrong exit() will be used and global destructors will 
  74.  * not get called .
  75.  */
  76.  
  77. #define STARTFILE_SPEC \
  78. "%{!r: gcc.ifile%s} %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \
  79. %{!r:_exit.o%s}"
  80.  
  81. #define ENDFILE_SPEC "crtn.o%s"
  82.  
  83. /* cpp has to support a #sccs directive for the /usr/include files */
  84.  
  85. #define SCCS_DIRECTIVE
  86.  
  87. /* GAS register prefix assembly syntax: */
  88.  
  89. /* User labels have no prefix */
  90. #undef  USER_LABEL_PREFIX 
  91. #define USER_LABEL_PREFIX ""
  92.  
  93. /* local labels are prefixed with ".L" */
  94. #undef  LOCAL_LABEL_PREFIX
  95. #define LOCAL_LABEL_PREFIX "."
  96.  
  97. /* registers are prefixed with "%" */
  98. #undef  REGISTER_PREFIX
  99. #define REGISTER_PREFIX "%"
  100.  
  101. #undef REGISTER_NAMES
  102. #define REGISTER_NAMES \
  103. {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",    \
  104.  "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp",    \
  105.  "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7"}
  106.  
  107. #undef FUNCTION_EXTRA_EPILOGUE
  108. #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE)                \
  109.   { extern int current_function_returns_pointer;            \
  110.     if ((current_function_returns_pointer) &&                \
  111.       ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode))        \
  112.       asm_fprintf (FILE, "\tmovl %Rd0,%Ra0\n"); } 
  113.  
  114. #define ASM_RETURN_CASE_JUMP   return "jmp %%pc@(2,%0:w)"
  115.  
  116. /* Although the gas we use can create .ctor and .dtor sections from N_SETT
  117.    stabs, it does not support section directives, so we need to have the loader
  118.    define the lists.
  119.  */
  120. #define CTOR_LISTS_DEFINED_EXTERNALLY
  121.  
  122. /* similar to default, but allows for the table defined by ld with gcc.ifile. 
  123.    nptrs is always 0.  So we need to instead check that __DTOR_LIST__[1] != 0.
  124.    The old check is left in so that the same macro can be used if and when  
  125.    a future version of gas does support section directives. */
  126.  
  127. #define DO_GLOBAL_DTORS_BODY {int nptrs = *(int *)__DTOR_LIST__; int i; \
  128.   if (nptrs == -1 || (__DTOR_LIST__[0] == 0 && __DTOR_LIST__[1] != 0))  \
  129.     for (nptrs = 0; __DTOR_LIST__[nptrs + 1] != 0; nptrs++);         \
  130.   for (i = nptrs; i >= 1; i--)                        \
  131.     __DTOR_LIST__[i] (); }
  132.  
  133. /* 
  134.  * Here is an example gcc.ifile.  I've tested it on PBB 68k and on sco 386
  135.  * systems. The NEXT(0x200000) works on just about all 386 and m68k systems, 
  136.  * but can be reduced to any power of 2 that is >= NBPS (0x10000 on a pbb).
  137.  
  138.    SECTIONS {
  139.        .text BIND(0x200200) BLOCK (0x200) : 
  140.         { *(.init) *(.text) vfork = fork; *(.fini) }
  141.  
  142.           GROUP BIND( NEXT(0x200000) + ADDR(.text) + SIZEOF(.text)):
  143.     {      .data : { __CTOR_LIST__ = . ; . += 4; *(.ctor) . += 4 ;
  144.                     __DTOR_LIST__ = . ; . += 4; *(.dtor) . += 4 ; }
  145.            .bss : { }
  146.        }
  147.   }
  148.  */
  149.  
  150. /*
  151. Local variables:
  152. version-control: t
  153. End:
  154. */
  155.