Annotation of GNUtools/cc/config/m68k/pbb.h, revision 1.1.1.1

1.1       root        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 [email protected] or [email protected]) */
                     26: 
                     27: #include "m68k/m68k.h"
                     28: 
                     29: /* See m68k.h.  5 means 68020 without 68881.  */
                     30: 
                     31: #define TARGET_DEFAULT 5
                     32: 
                     33: /* Don't try using XFmode.  */
                     34: #undef LONG_DOUBLE_TYPE_SIZE
                     35: #define LONG_DOUBLE_TYPE_SIZE 64
                     36: 
                     37: /* Every structure or union's size must be a multiple of 2 bytes.  */
                     38: #define STRUCTURE_SIZE_BOUNDARY 16
                     39: 
                     40: /* Define __HAVE_68881__ in preprocessor if -m68881 is specified.
                     41:    This will control the use of inline 68881 insns in certain macros.  */
                     42: 
                     43: #define CPP_SPEC "%{m68881:-D__HAVE_68881__}"
                     44: 
                     45: /* Names to predefine in the preprocessor for this target machine.  */
                     46: 
                     47: #define CPP_PREDEFINES "-Dm68k -Dunix -DUnicomPBB -Dmc68k -Dmc68020 -Dmc68k32 -Asystem(unix)  -Acpu(m68k) -Amachine(m68k)"
                     48: 
                     49: /* We want DBX format for use with gdb under COFF.  */
                     50: 
                     51: #define DBX_DEBUGGING_INFO
                     52: 
                     53: /* Generate calls to memcpy, memcmp and memset.  */
                     54: 
                     55: #define TARGET_MEM_FUNCTIONS
                     56: 
                     57: /* -m68000 requires special flags to the assembler. */
                     58: 
                     59: #define ASM_SPEC \
                     60:  " %{m68000:-mc68010}%{mc68000:-mc68010}"
                     61: 
                     62: /* we use /lib/libp/lib*  when profiling */
                     63: 
                     64: #define LIB_SPEC "%{p:-L/usr/lib/libp} %{pg:-L/usr/lib/libp} -lc"
                     65: 
                     66: 
                     67: /* Use crt1.o as a startup file and crtn.o as a closing file.  */
                     68: /*
                     69:  * The loader directive file gcc.ifile defines how to merge the constructor 
                     70:  * sections into the data section.  Also, since gas only puts out those 
                     71:  * sections in response to N_SETT stabs, and does not (yet) have a 
                     72:  * ".sections" directive, gcc.ifile also defines the list symbols 
                     73:  * __DTOR_LIST__ and __CTOR_LIST__.
                     74:  * 
                     75:  * Finally, we must explicitly specify the file from libgcc.a that defines
                     76:  * exit(), otherwise if the user specifies (for example) "-lc_s" on the 
                     77:  * command line, the wrong exit() will be used and global destructors will 
                     78:  * not get called .
                     79:  */
                     80: 
                     81: #define STARTFILE_SPEC \
                     82: "%{!r: gcc.ifile%s} %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \
                     83: %{!r:_exit.o%s}"
                     84: 
                     85: #define ENDFILE_SPEC "crtn.o%s"
                     86: 
                     87: /* cpp has to support a #sccs directive for the /usr/include files */
                     88: 
                     89: #define SCCS_DIRECTIVE
                     90: 
                     91: /* GAS register prefix assembly syntax: */
                     92: 
                     93: /* User labels have no prefix */
                     94: #undef  USER_LABEL_PREFIX 
                     95: #define USER_LABEL_PREFIX ""
                     96: 
                     97: /* local labels are prefixed with ".L" */
                     98: #undef  LOCAL_LABEL_PREFIX
                     99: #define LOCAL_LABEL_PREFIX "."
                    100: 
                    101: /* registers are prefixed with "%" */
                    102: #undef  REGISTER_PREFIX
                    103: #define REGISTER_PREFIX "%"
                    104: 
                    105: #undef REGISTER_NAMES
                    106: #define REGISTER_NAMES \
                    107: {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",       \
                    108:  "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp",       \
                    109:  "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7"}
                    110: 
                    111: #undef FUNCTION_EXTRA_EPILOGUE
                    112: #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE)                            \
                    113:   { extern int current_function_returns_pointer;                       \
                    114:     if ((current_function_returns_pointer) &&                          \
                    115:       ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode))        \
                    116:       asm_fprintf (FILE, "\tmovl %Rd0,%Ra0\n"); } 
                    117: 
                    118: #define ASM_RETURN_CASE_JUMP   return "jmp %%pc@(2,%0:w)"
                    119: 
                    120: /* Although the gas we use can create .ctor and .dtor sections from N_SETT
                    121:    stabs, it does not support section directives, so we need to have the loader
                    122:    define the lists.
                    123:  */
                    124: #define CTOR_LISTS_DEFINED_EXTERNALLY
                    125: 
                    126: /* similar to default, but allows for the table defined by ld with gcc.ifile. 
                    127:    nptrs is always 0.  So we need to instead check that __DTOR_LIST__[1] != 0.
                    128:    The old check is left in so that the same macro can be used if and when  
                    129:    a future version of gas does support section directives. */
                    130: 
                    131: #define DO_GLOBAL_DTORS_BODY {int nptrs = *(int *)__DTOR_LIST__; int i; \
                    132:   if (nptrs == -1 || (__DTOR_LIST__[0] == 0 && __DTOR_LIST__[1] != 0))  \
                    133:     for (nptrs = 0; __DTOR_LIST__[nptrs + 1] != 0; nptrs++);           \
                    134:   for (i = nptrs; i >= 1; i--)                                         \
                    135:     __DTOR_LIST__[i] (); }
                    136: 
                    137: /* 
                    138:  * Here is an example gcc.ifile.  I've tested it on PBB 68k and on sco 386
                    139:  * systems. The NEXT(0x200000) works on just about all 386 and m68k systems, 
                    140:  * but can be reduced to any power of 2 that is >= NBPS (0x10000 on a pbb).
                    141: 
                    142:    SECTIONS {
                    143:        .text BIND(0x200200) BLOCK (0x200) : 
                    144:                { *(.init) *(.text) vfork = fork; *(.fini) }
                    145: 
                    146:        GROUP BIND( NEXT(0x200000) + ADDR(.text) + SIZEOF(.text)):
                    147:        {      .data : { __CTOR_LIST__ = . ; . += 4; *(.ctor) . += 4 ;
                    148:                         __DTOR_LIST__ = . ; . += 4; *(.dtor) . += 4 ; }
                    149:               .bss : { }
                    150:        }
                    151:   }
                    152:  */
                    153: 
                    154: /*
                    155: Local variables:
                    156: version-control: t
                    157: End:
                    158: */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.