OSDN Git Service

a3b41baf260e7f89586d10d0549c531ad7f173fc
[pf3gnuchains/gcc-fork.git] / gcc / config / ns32k / merlin.h
1 /* Definitions of target machine for GNU compiler.  MERLIN NS32000 version.
2    Copyright (C) 1990, 1994, 2000 Free Software Foundation, Inc.
3    By Mark Mason (mason@reed.bitnet, pyramid!unify!mason@uunet.uu.net).
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 /* Two flags to control how addresses are printed in assembler insns.  */
23
24 #define SEQUENT_ADDRESS_BUG 1
25 #define SEQUENT_BASE_REGS
26
27 #include "ns32k/ns32k.h"
28
29 #define MERLIN_TARGET
30
31 /* This is BSD, so it wants DBX format.  */
32 #define DBX_DEBUGGING_INFO
33
34 /* Sequent has some changes in the format of DBX symbols.  */
35 #define DBX_NO_XREFS 1
36
37 /* Don't split DBX symbols into continuations.  */
38 #define DBX_CONTIN_LENGTH 0
39
40 #define TARGET_DEFAULT 1
41
42 /* Print subsidiary information on the compiler version in use.  */
43 #undef TARGET_VERSION
44 #define TARGET_VERSION fprintf (stderr, " (32000, UTek syntax)");
45
46 /* These control the C++ compiler somehow.  */
47 #define FASCIST_ASSEMBLER
48 #define USE_COLLECT
49
50 #undef CPP_PREDEFINES
51 #define CPP_PREDEFINES \
52         "-Dns32000 -Dns32k -Dns16000 -Dmerlin -Dunix -DUtek -Dbsd \
53         -Asystem=unix -Asystem=bsd -Acpu=ns32k -Amachine=ns32k"
54
55 /* This is how to align the code that follows an unconditional branch.
56    Don't define it, since it confuses the assembler (we hear).  */
57
58 #undef LABEL_ALIGN_AFTER_BARRIER
59
60 /* Assembler pseudo-op for shared data segment. */
61 #define SHARED_SECTION_ASM_OP "\t.shdata"
62
63 /* %$ means print the prefix for an immediate operand. */
64
65 #ifdef UTEK_ASM
66 #undef PRINT_OPERAND
67 #define PRINT_OPERAND(FILE, X, CODE)  \
68 { if (CODE == '$') putc('$', FILE);                                     \
69   else if (CODE == '?');                                                \
70   else if (GET_CODE (X) == CONST_INT)                                   \
71     fprintf(FILE, "$%d", INTVAL(X));                                    \
72   else if (GET_CODE (X) == REG)                                         \
73     fprintf (FILE, "%s", reg_names[REGNO (X)]);                         \
74   else if (GET_CODE (X) == MEM)                                         \
75     {                                                                   \
76       rtx xfoo;                                                         \
77       xfoo = XEXP (X, 0);                                               \
78       switch (GET_CODE (xfoo))                                          \
79         {                                                               \
80         case MEM:                                                       \
81           if (GET_CODE (XEXP (xfoo, 0)) == REG)                         \
82             if (REGNO (XEXP (xfoo, 0)) == STACK_POINTER_REGNUM)         \
83               fprintf (FILE, "0(0(sp))");                               \
84             else fprintf (FILE, "0(0(%s))",                             \
85                           reg_names[REGNO (XEXP (xfoo, 0))]);           \
86           else                                                          \
87             {                                                           \
88               if (GET_CODE (XEXP (xfoo, 0)) == SYMBOL_REF               \
89                   || GET_CODE (XEXP (xfoo, 0)) == CONST)                \
90                 {                                                       \
91                   fprintf(FILE, "0(");                                  \
92                   output_address(xfoo);                                 \
93                   fprintf(FILE, "(sb))");                               \
94                 }                                                       \
95               else                                                      \
96                 {                                                       \
97                   fprintf (FILE, "0(");                                 \
98                   output_address (xfoo);                                \
99                   putc (')', FILE);                                     \
100                 }                                                       \
101             }                                                           \
102           break;                                                        \
103         case REG:                                                       \
104           fprintf (FILE, "0(%s)", reg_names[REGNO (xfoo)]);             \
105           break;                                                        \
106         case PRE_DEC:                                                   \
107         case POST_INC:                                                  \
108           fprintf (FILE, "tos");                                        \
109           break;                                                        \
110         case CONST_INT:                                                 \
111           fprintf (FILE, "$%d", INTVAL (xfoo));                         \
112           break;                                                        \
113         default:                                                        \
114           output_address (xfoo);                                        \
115           break;                                                        \
116         }                                                               \
117     }                                                                   \
118   else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode)    \
119     if (GET_MODE (X) == DFmode)                                         \
120       { union { double d; int i[2]; } u;                                \
121         u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X);  \
122         fprintf (FILE, "$0d%.20e", u.d); }                              \
123     else { union { double d; int i[2]; } u;                             \
124            u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \
125            fprintf (FILE, "$0f%.20e", u.d); }                           \
126   else output_addr_const (FILE, X); }
127
128 #endif /* UTEK_ASM */
129
130 #undef PRINT_OPERAND_ADDRESS
131 #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  print_operand_address(FILE, ADDR)