Commit | Line | Data |
---|---|---|
ef2a44a3 C |
1 | /* Definitions of target machine for GNU compiler. SEQUENT NS32000 version. |
2 | Copyright (C) 1987 Free Software Foundation, Inc. | |
3 | Contributed by Michael Tiemann (tiemann@mcc.com) | |
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 1, 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
20 | ||
21 | /* Two flags to control how addresses are printed in assembler insns. */ | |
22 | #define SEQUENT_ADDRESS_BUG 1 | |
23 | #define SEQUENT_BASE_REGS | |
24 | ||
25 | #include "tm-ns32k.h" | |
26 | ||
27 | /* This is BSD, so it wants DBX format. */ | |
28 | #define DBX_DEBUGGING_INFO | |
29 | ||
30 | /* Sequent has some changes in the format of DBX symbols. */ | |
31 | #define DBX_NO_XREFS 1 | |
32 | ||
33 | /* Don't split DBX symbols into continuations. */ | |
34 | #define DBX_CONTIN_LENGTH 0 | |
35 | ||
36 | #define TARGET_DEFAULT 1 | |
37 | ||
38 | /* Print subsidiary information on the compiler version in use. */ | |
39 | #undef TARGET_VERSION | |
40 | #define TARGET_VERSION fprintf (stderr, " (32000, Sequent syntax)"); | |
41 | ||
42 | #undef CPP_PREDEFINES | |
43 | #define CPP_PREDEFINES "-Dns32000 -Dsequent -Dunix" | |
44 | ||
45 | /* This is how to align the code that follows an unconditional branch. | |
46 | Don't define it, since it confuses the assembler (we hear). */ | |
47 | ||
48 | #undef ASM_OUTPUT_ALIGN_CODE | |
49 | ||
50 | /* Assember pseudo-op for shared data segment. */ | |
51 | #define SHARED_SECTION_ASM_OP ".shdata" | |
52 | ||
53 | /* Control how stack adjust insns are output. */ | |
54 | #define SEQUENT_ADJUST_STACK | |
55 | ||
56 | /* %$ means print the prefix for an immediate operand. | |
57 | On the sequent, no prefix is used for such. */ | |
58 | ||
59 | #undef PRINT_OPERAND | |
60 | #define PRINT_OPERAND(FILE, X, CODE) \ | |
61 | { if (CODE == '$') ; \ | |
62 | else if (CODE == '?'); \ | |
63 | else if (GET_CODE (X) == REG) \ | |
64 | fprintf (FILE, "%s", reg_names[REGNO (X)]); \ | |
65 | else if (GET_CODE (X) == MEM) \ | |
66 | { \ | |
67 | rtx xfoo; \ | |
68 | xfoo = XEXP (X, 0); \ | |
69 | switch (GET_CODE (xfoo)) \ | |
70 | { \ | |
71 | case MEM: \ | |
72 | if (GET_CODE (XEXP (xfoo, 0)) == REG) \ | |
73 | if (REGNO (XEXP (xfoo, 0)) == STACK_POINTER_REGNUM) \ | |
74 | fprintf (FILE, "0(0(sp))"); \ | |
75 | else fprintf (FILE, "0(0(%s))", \ | |
76 | reg_names[REGNO (XEXP (xfoo, 0))]); \ | |
77 | else \ | |
78 | { \ | |
79 | fprintf (FILE, "0("); \ | |
80 | output_address (xfoo); \ | |
81 | putc (')', FILE); \ | |
82 | } \ | |
83 | break; \ | |
84 | case REG: \ | |
85 | fprintf (FILE, "0(%s)", reg_names[REGNO (xfoo)]); \ | |
86 | break; \ | |
87 | case PRE_DEC: \ | |
88 | case POST_INC: \ | |
89 | fprintf (FILE, "tos"); \ | |
90 | break; \ | |
91 | case CONST_INT: \ | |
92 | fprintf (FILE, "@%d", INTVAL (xfoo)); \ | |
93 | break; \ | |
94 | default: \ | |
95 | output_address (xfoo); \ | |
96 | break; \ | |
97 | } \ | |
98 | } \ | |
99 | else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != DImode) \ | |
100 | if (GET_MODE (X) == DFmode) \ | |
101 | { union { double d; int i[2]; } u; \ | |
102 | u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ | |
103 | fprintf (FILE, "0d%.20e", u.d); } \ | |
104 | else { union { double d; int i[2]; } u; \ | |
105 | u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ | |
106 | fprintf (FILE, "0f%.20e", u.d); } \ | |
107 | else output_addr_const (FILE, X); } | |
108 | ||
109 | #undef PRINT_OPERAND_ADDRESS | |
110 | #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR) |