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