OSDN Git Service

* Makefile.in (final.o): Depend on target.h.
[pf3gnuchains/gcc-fork.git] / gcc / config / ns32k / tek6000.h
1 /* Definitions of target machine for GNU compiler.
2    Generic Tektronix 6000 series NS32000 version.
3    See ns32k/tek6100.h and ns32k/tek6200.h, which include this file.
4    Copyright (C) 1990, 2000 Free Software Foundation, Inc.
5    Created by Snoopy  (sopwith.uucp!snoopy).
6    Based on work by Mark Mason (mason@reed.bitnet,
7    pyramid!unify!mason@uunet.uu.net) and Keith Packard.
8
9 This file is part of GNU CC.
10
11 GNU CC is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
14 any later version.
15
16 GNU CC is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with GNU CC; see the file COPYING.  If not, write to
23 the Free Software Foundation, 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA.  */
25
26 /* Generate syntax for the UTek assembler. */
27 #ifndef UTEK_ASM
28 #define UTEK_ASM
29 #endif
30
31 /* Two flags to control how addresses are printed in assembler insns.  */
32
33 /* The way PUT_ABSOLUTE_PREFIX in ns32k.h works, setting it to 0 will
34  * turn it off.  Define ABSOLUTE_PREFIX before including ns32k.h.
35  */
36 #define ABSOLUTE_PREFIX         0
37 #define IMMEDIATE_PREFIX        '$'
38
39 #include "ns32k/ns32k.h"
40
41 /* Define these after ns32k.c so we will notice if gcc tries to
42  * output external mode addressing.  UTek's as and ld do not support
43  * external mode addressing, according to Daryl McDaniel (illian.uucp!darylm).
44  * Hopefully the UTek assembler will complain if gcc feeds it this stuff.
45  * They don't seem to do anything, I think that gcc is not actually
46  * trying to generate external mode operands.
47  */
48 #undef PUT_EXTERNAL_PREFIX
49 #define PUT_EXTERNAL_PREFIX(arg)  fprintf(arg, "  Should not be using external mode under UTek.  ")
50 #define EXTERNAL_PREFIX '%'
51
52 /* Used in ns32k.c to control syntax. */
53 #define NO_ABSOLUTE_PREFIX_IF_SYMBOLIC
54 #define NO_IMMEDIATE_PREFIX_IF_SYMBOLIC
55
56 /* Used in ns32k.md to specify syntax of bsr/jsr operand. */
57 #define CALL_MEMREF_IMPLICIT
58
59 /* #define PC_RELATIVE */       /* Seems to break things. */
60 #define BASE_REG_NEEDED         /* Seems to fix problem where external mode
61                                  * syntax was being generated.
62                                  */
63
64 /*  ------------   Debugging Support   ----------------------------- */
65
66 /* The sdb support does not yet work with UTek.  Need to teach gcc
67  * how to create sdb type stabs as well as dbx style stabs.
68  */
69 #define DBX_DEBUGGING_INFO
70 /* #define SDB_DEBUGGING_INFO */
71
72 /* Act the same as the UTek complier: -g for dbx, -go for sdb.
73  * This is used in toplev.c.
74  */
75 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
76
77 #define CC1_SPEC "{go:-gcoff}"
78 #define CC1PLUS_SPEC "{go:-gcoff}"
79
80 /* Sequent has some changes in the format of DBX symbols.  */
81 #define DBX_NO_XREFS 1
82
83 /* Don't split DBX symbols into continuations.  */
84 #define DBX_CONTIN_LENGTH 0
85
86 /* ------------------------------------------- */
87
88 #define TARGET_DEFAULT 1
89
90 /* These control the C++ compiler somehow.  */
91 #define FASCIST_ASSEMBLER
92 #define USE_COLLECT
93
94 /* Print subsidiary information on the compiler version in use.  */
95 #undef TARGET_VERSION
96 #define TARGET_VERSION fprintf (stderr, " (ns32k, UTek syntax)");
97
98 /* The tek6100.h and tek6200.h files add stratos or merlin respectively. */
99
100 #define CPP_PREDEFINES_Tek6000 \
101   "-Dns16000 -Dns32000 -Dns32k -Dns32016 -DUTek -DUTEK -Dbsd -DBSD \
102    -Asystem=unix -Asystem=bsd -Acpu=ns32k -Amachine=ns32k"
103 #undef CPP_PREDEFINES
104 #define CPP_PREDEFINES CPP_PREDEFINES_Tek6000
105
106 /* This is how to align the code that follows an unconditional branch.
107    Don't define it, since it confuses the assembler (we hear).  */
108
109 #undef LABEL_ALIGN_AFTER_BARRIER
110
111 /* Assembler pseudo-op for shared data segment. */
112 #define SHARED_SECTION_ASM_OP "\t.shdata"
113
114 #ifdef UTEK_ASM
115
116 /* UTek assembler needs "ret $0", not "ret 0". */
117 #undef  TRANSFER_FROM_TRAMPOLINE
118 #define TRANSFER_FROM_TRAMPOLINE        \
119 void                                    \
120 __transfer_from_trampoline ()           \
121 {                                       \
122   asm ("___trampoline:");               \
123   asm ("movd 16(r2),tos");              \
124   asm ("movd 12(r2),r2");               \
125   asm ("ret $0");                       \
126 }
127
128 #endif /* UTEK_ASM */
129
130 #undef PRINT_OPERAND_ADDRESS
131 #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  print_operand_address(FILE, ADDR)
132
133 /* The UTek library supplies bcopy() and friends, not memcpy(). */
134 #ifdef TARGET_MEM_FUNCTIONS
135 #undef TARGET_MEM_FUNCTIONS
136 #endif