OSDN Git Service

* config/i386/i386.c (ix86_expand_setcc): Don't use method 0
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / ptx4-i.h
1 /* Target definitions for GNU compiler for Intel 80386 running Dynix/ptx v4
2    Copyright (C) 1996 Free Software Foundation, Inc.
3
4    Modified from sysv4.h
5    Originally written by Ron Guilmette (rfg@netcom.com).
6    Modified by Tim Wright (timw@sequent.com).
7
8 This file is part of GNU CC.
9
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.
14
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.
19
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.  */
24
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) */
28
29 #undef TARGET_VERSION
30 #define TARGET_VERSION fprintf (stderr, " (i386 Sequent Dynix/ptx Version 4)");
31
32 /* The svr4 ABI for the i386 says that records and unions are returned
33    in memory.  */
34
35 #undef RETURN_IN_MEMORY
36 #define RETURN_IN_MEMORY(TYPE) \
37   (TYPE_MODE (TYPE) == BLKmode \
38    || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8))
39
40 /* Define which macros to predefine.  _SEQUENT_ is our extension.  */
41 /* This used to define X86, but james@bigtex.cactus.org says that
42    is supposed to be defined optionally by user programs--not by default.  */
43 #define CPP_PREDEFINES \
44   "-Dunix -D_SEQUENT_ -Asystem=unix -Asystem=ptx4"
45
46 /* This is how to output assembly code to define a `float' constant.
47    We always have to use a .long pseudo-op to do this because the native
48    SVR4 ELF assembler is buggy and it generates incorrect values when we
49    try to use the .float pseudo-op instead.  */
50
51 #undef ASM_OUTPUT_FLOAT
52 #define ASM_OUTPUT_FLOAT(FILE,VALUE)                                    \
53 do { long value;                                                        \
54      REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value);                      \
55      if (sizeof (int) == sizeof (long))                                 \
56          fprintf((FILE), "%s0x%x\n", ASM_LONG, value);                  \
57      else                                                               \
58          fprintf((FILE), "%s0x%lx\n", ASM_LONG, value);                 \
59    } while (0)
60
61 /* This is how to output assembly code to define a `double' constant.
62    We always have to use a pair of .long pseudo-ops to do this because
63    the native SVR4 ELF assembler is buggy and it generates incorrect
64    values when we try to use the .double pseudo-op instead.  */
65
66 #undef ASM_OUTPUT_DOUBLE
67 #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                                   \
68 do { long value[2];                                                     \
69      REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value);                      \
70      if (sizeof (int) == sizeof (long))                                 \
71        {                                                                \
72          fprintf((FILE), "%s0x%x\n", ASM_LONG, value[0]);               \
73          fprintf((FILE), "%s0x%x\n", ASM_LONG, value[1]);               \
74        }                                                                \
75      else                                                               \
76        {                                                                \
77          fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[0]);              \
78          fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[1]);              \
79        }                                                                \
80    } while (0)
81
82
83 #undef ASM_OUTPUT_LONG_DOUBLE
84 #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE)                              \
85 do { long value[3];                                                     \
86      REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value);                 \
87      if (sizeof (int) == sizeof (long))                                 \
88        {                                                                \
89          fprintf((FILE), "%s0x%x\n", ASM_LONG, value[0]);               \
90          fprintf((FILE), "%s0x%x\n", ASM_LONG, value[1]);               \
91          fprintf((FILE), "%s0x%x\n", ASM_LONG, value[2]);               \
92        }                                                                \
93      else                                                               \
94        {                                                                \
95          fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[0]);              \
96          fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[1]);              \
97          fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[2]);              \
98        }                                                                \
99    } while (0)
100
101 #undef DBX_REGISTER_NUMBER
102 #define DBX_REGISTER_NUMBER(n)  svr4_dbx_register_map[n]
103
104 /* The routine used to output sequences of byte values.  We use a special
105    version of this for most svr4 targets because doing so makes the
106    generated assembly code more compact (and thus faster to assemble)
107    as well as more readable.  Note that if we find subparts of the
108    character sequence which end with NUL (and which are shorter than
109    STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING.  */
110
111 #undef ASM_OUTPUT_ASCII
112 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH)                             \
113   do                                                                    \
114     {                                                                   \
115       register const unsigned char *_ascii_bytes =                      \
116         (const unsigned char *) (STR);                                  \
117       register const unsigned char *limit = _ascii_bytes + (LENGTH);    \
118       register unsigned bytes_in_chunk = 0;                             \
119       for (; _ascii_bytes < limit; _ascii_bytes++)                      \
120         {                                                               \
121           register const unsigned char *p;                              \
122           if (bytes_in_chunk >= 64)                                     \
123             {                                                           \
124               fputc ('\n', (FILE));                                     \
125               bytes_in_chunk = 0;                                       \
126             }                                                           \
127           for (p = _ascii_bytes; p < limit && *p != '\0'; p++)          \
128             continue;                                                   \
129           if (p < limit && (p - _ascii_bytes) <= STRING_LIMIT)          \
130             {                                                           \
131               if (bytes_in_chunk > 0)                                   \
132                 {                                                       \
133                   fputc ('\n', (FILE));                                 \
134                   bytes_in_chunk = 0;                                   \
135                 }                                                       \
136               ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes);         \
137               _ascii_bytes = p;                                         \
138             }                                                           \
139           else                                                          \
140             {                                                           \
141               if (bytes_in_chunk == 0)                                  \
142                 fprintf ((FILE), "\t.byte\t");                          \
143               else                                                      \
144                 fputc (',', (FILE));                                    \
145               fprintf ((FILE), "0x%02x", *_ascii_bytes);                \
146               bytes_in_chunk += 5;                                      \
147             }                                                           \
148         }                                                               \
149       if (bytes_in_chunk > 0)                                           \
150         fprintf ((FILE), "\n");                                         \
151     }                                                                   \
152   while (0)
153
154 /* This is how to output an element of a case-vector that is relative.
155    This is only used for PIC code.  See comments by the `casesi' insn in
156    i386.md for an explanation of the expression this outputs. */
157
158 #undef ASM_OUTPUT_ADDR_DIFF_ELT
159 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
160   fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
161
162 /* Indicate that jump tables go in the text section.  This is
163    necessary when compiling PIC code.  */
164
165 #define JUMP_TABLES_IN_TEXT_SECTION 1