* rtl.h (rtunion_def): Constify member `rtstr'.
[official-gcc.git] / gcc / config / i386 / ptx4-i.h
bloba8594a2cef0d4471691c989a47bd2bb8813ccc00
1 /* Target definitions for GNU compiler for Intel 80386 running Dynix/ptx v4
2 Copyright (C) 1996 Free Software Foundation, Inc.
4 Modified from sysv4.h
5 Originally written by Ron Guilmette (rfg@netcom.com).
6 Modified by Tim Wright (timw@sequent.com).
8 This file is part of GNU CC.
10 GNU CC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
15 GNU CC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with GNU CC; see the file COPYING. If not, write to
22 the Free Software Foundation, 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
25 #include "i386/i386.h" /* Base i386 target machine definitions */
26 #include "i386/att.h" /* Use the i386 AT&T assembler syntax */
27 #include "ptx4.h" /* Rest of definitions (non architecture dependent) */
29 #undef TARGET_VERSION
30 #define TARGET_VERSION fprintf (stderr, " (i386 Sequent Dynix/ptx Version 4)");
32 /* The svr4 ABI for the i386 says that records and unions are returned
33 in memory. */
35 #undef RETURN_IN_MEMORY
36 #define RETURN_IN_MEMORY(TYPE) \
37 (TYPE_MODE (TYPE) == BLKmode)
39 /* Define which macros to predefine. _SEQUENT_ is our extension. */
40 /* This used to define X86, but james@bigtex.cactus.org says that
41 is supposed to be defined optionally by user programs--not by default. */
42 #define CPP_PREDEFINES \
43 "-Dunix -D_SEQUENT_ -Asystem(unix) -Asystem(ptx4)"
45 /* This is how to output assembly code to define a `float' constant.
46 We always have to use a .long pseudo-op to do this because the native
47 SVR4 ELF assembler is buggy and it generates incorrect values when we
48 try to use the .float pseudo-op instead. */
50 #undef ASM_OUTPUT_FLOAT
51 #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
52 do { long value; \
53 REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value); \
54 if (sizeof (int) == sizeof (long)) \
55 fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value); \
56 else \
57 fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value); \
58 } while (0)
60 /* This is how to output assembly code to define a `double' constant.
61 We always have to use a pair of .long pseudo-ops to do this because
62 the native SVR4 ELF assembler is buggy and it generates incorrect
63 values when we try to use the .double pseudo-op instead. */
65 #undef ASM_OUTPUT_DOUBLE
66 #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
67 do { long value[2]; \
68 REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value); \
69 if (sizeof (int) == sizeof (long)) \
70 { \
71 fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[0]); \
72 fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[1]); \
73 } \
74 else \
75 { \
76 fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[0]); \
77 fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[1]); \
78 } \
79 } while (0)
82 #undef ASM_OUTPUT_LONG_DOUBLE
83 #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
84 do { long value[3]; \
85 REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
86 if (sizeof (int) == sizeof (long)) \
87 { \
88 fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[0]); \
89 fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[1]); \
90 fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[2]); \
91 } \
92 else \
93 { \
94 fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[0]); \
95 fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[1]); \
96 fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[2]); \
97 } \
98 } while (0)
100 /* Output at beginning of assembler file. */
101 /* The .file command should always begin the output. */
103 #undef ASM_FILE_START
104 #define ASM_FILE_START(FILE) \
105 do { \
106 output_file_directive (FILE, main_input_filename); \
107 fprintf (FILE, "\t.version\t\"01.01\"\n"); \
108 } while (0)
110 #undef DBX_REGISTER_NUMBER
111 #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n]
113 /* The routine used to output sequences of byte values. We use a special
114 version of this for most svr4 targets because doing so makes the
115 generated assembly code more compact (and thus faster to assemble)
116 as well as more readable. Note that if we find subparts of the
117 character sequence which end with NUL (and which are shorter than
118 STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING. */
120 #undef ASM_OUTPUT_ASCII
121 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
122 do \
124 register const unsigned char *_ascii_bytes = \
125 (const unsigned char *) (STR); \
126 register const unsigned char *limit = _ascii_bytes + (LENGTH); \
127 register unsigned bytes_in_chunk = 0; \
128 for (; _ascii_bytes < limit; _ascii_bytes++) \
130 register const unsigned char *p; \
131 if (bytes_in_chunk >= 64) \
133 fputc ('\n', (FILE)); \
134 bytes_in_chunk = 0; \
136 for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \
137 continue; \
138 if (p < limit && (p - _ascii_bytes) <= STRING_LIMIT) \
140 if (bytes_in_chunk > 0) \
142 fputc ('\n', (FILE)); \
143 bytes_in_chunk = 0; \
145 ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \
146 _ascii_bytes = p; \
148 else \
150 if (bytes_in_chunk == 0) \
151 fprintf ((FILE), "\t.byte\t"); \
152 else \
153 fputc (',', (FILE)); \
154 fprintf ((FILE), "0x%02x", *_ascii_bytes); \
155 bytes_in_chunk += 5; \
158 if (bytes_in_chunk > 0) \
159 fprintf ((FILE), "\n"); \
161 while (0)
163 /* This is how to output an element of a case-vector that is relative.
164 This is only used for PIC code. See comments by the `casesi' insn in
165 i386.md for an explanation of the expression this outputs. */
167 #undef ASM_OUTPUT_ADDR_DIFF_ELT
168 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
169 fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
171 /* Indicate that jump tables go in the text section. This is
172 necessary when compiling PIC code. */
174 #define JUMP_TABLES_IN_TEXT_SECTION 1