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.
9 This file is part of GNU CC.
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)
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.
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. */
26 /* Generate syntax for the UTek assembler. */
31 /* Two flags to control how addresses are printed in assembler insns. */
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.
36 #define ABSOLUTE_PREFIX 0
37 #define IMMEDIATE_PREFIX '$'
39 #include "ns32k/ns32k.h"
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.
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 '%'
52 /* Used in ns32k.c to control syntax. */
53 #define NO_ABSOLUTE_PREFIX_IF_SYMBOLIC
54 #define NO_IMMEDIATE_PREFIX_IF_SYMBOLIC
56 /* Used in ns32k.md to specify syntax of bsr/jsr operand. */
57 #define CALL_MEMREF_IMPLICIT
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.
64 /* ------------ Debugging Support ----------------------------- */
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.
69 #define DBX_DEBUGGING_INFO
70 /* #define SDB_DEBUGGING_INFO */
72 /* Act the same as the UTek complier: -g for dbx, -go for sdb.
73 * This is used in toplev.c.
75 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
77 #define CC1_SPEC "{go:-gcoff}"
78 #define CC1PLUS_SPEC "{go:-gcoff}"
80 /* Sequent has some changes in the format of DBX symbols. */
81 #define DBX_NO_XREFS 1
83 /* Don't split DBX symbols into continuations. */
84 #define DBX_CONTIN_LENGTH 0
86 /* ------------------------------------------- */
88 #define TARGET_DEFAULT 1
90 /* These control the C++ compiler somehow. */
91 #define FASCIST_ASSEMBLER
94 /* Print subsidiary information on the compiler version in use. */
96 #define TARGET_VERSION fprintf (stderr, " (ns32k, UTek syntax)");
98 /* The tek6100.h and tek6200.h files add stratos or merlin respectively. */
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
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). */
109 #undef LABEL_ALIGN_AFTER_BARRIER
111 /* Assembler pseudo-op for shared data segment. */
112 #define SHARED_SECTION_ASM_OP "\t.shdata"
116 /* UTek assembler needs "ret $0", not "ret 0". */
117 #undef TRANSFER_FROM_TRAMPOLINE
118 #define TRANSFER_FROM_TRAMPOLINE \
120 __transfer_from_trampoline () \
122 asm ("___trampoline:"); \
123 asm ("movd 16(r2),tos"); \
124 asm ("movd 12(r2),r2"); \
128 #endif /* UTEK_ASM */
130 #undef PRINT_OPERAND_ADDRESS
131 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR)
133 /* The UTek library supplies bcopy() and friends, not memcpy(). */
134 #ifdef TARGET_MEM_FUNCTIONS
135 #undef TARGET_MEM_FUNCTIONS