OSDN Git Service

* config/i386/i386.c (ix86_expand_setcc): Don't use method 0
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / sequent.h
1 /* Definitions for Sequent Intel 386.
2    Copyright (C) 1988, 1994, 1999, 2000 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 #include "i386/i386.h"
22
23 /* Use the BSD assembler syntax.  */
24
25 #include "i386/bsd.h"
26
27 /* By default, don't use IEEE compatible arithmetic comparisons
28    because the assembler can't handle the fucom insn.
29    Return float values in the 387.  */
30
31 #undef TARGET_SUBTARGET_DEFAULT
32 #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS)
33
34 /* Specify predefined symbols in preprocessor.  */
35
36 #define CPP_PREDEFINES "-Dunix -Dsequent -Asystem=unix"
37
38 /* Pass -Z and -ZO options to the linker.  */
39
40 #define LINK_SPEC "%{Z*}"
41
42 #if 0 /* Dynix 3.1 is said to accept -L.  */
43 /* Dynix V3.0.12 doesn't accept -L at all.  */
44
45 #define LINK_LIBGCC_SPECIAL
46 #endif
47
48 /* Link with libg.a when debugging, for dbx's sake.  */
49
50 #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} "
51
52 /* We don't want to output SDB debugging information.  */
53
54 #undef SDB_DEBUGGING_INFO
55
56 /* We want to output DBX debugging information.  */
57
58 #define DBX_DEBUGGING_INFO
59
60 /* Sequent Symmetry has size_t defined as int in /usr/include/sys/types.h */
61 #define SIZE_TYPE "int"
62
63 /* gcc order is ax, dx, cx, bx, si, di, bp, sp, st, st.
64  * dbx order is ax, dx, cx, st(0), st(1), bx, si, di, st(2), st(3),
65  *              st(4), st(5), st(6), st(7), sp, bp  */
66
67 #undef DBX_REGISTER_NUMBER
68 #define DBX_REGISTER_NUMBER(n)          \
69 ((n) < 3 ? (n) : (n) < 6 ? (n) + 2      \
70  : (n) == 6 ? 15 : (n) == 7 ? 14 : 3)
71
72 /* malcolmp@hydra.maths.unsw.EDU.AU says these two definitions
73    fix trouble in dbx.  */
74 #undef DBX_OUTPUT_LBRAC
75 #define DBX_OUTPUT_LBRAC(file,name)     \
76               fprintf (asmfile, "%s%d,0,%d,", ASM_STABN_OP, N_LBRAC, depth); \
77               assemble_name (asmfile, buf); \
78               fprintf (asmfile, "\n");
79
80 #undef DBX_OUTPUT_RBRAC
81 #define DBX_OUTPUT_RBRAC(file,name)     \
82               fprintf (asmfile, "%s%d,0,%d,", ASM_STABN_OP, N_RBRAC, depth); \
83               assemble_name (asmfile, buf); \
84               fprintf (asmfile, "\n");
85
86 /* Prevent anything from being allocated in the register pair cx/bx,
87    since that would confuse GDB.  */
88
89 #undef HARD_REGNO_MODE_OK
90 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
91   (((REGNO) < 2 ? 1                                                     \
92     : (REGNO) < 4 ? 1                                                   \
93     : FP_REGNO_P (REGNO) ? (GET_MODE_CLASS (MODE) == MODE_FLOAT         \
94                             || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT) \
95     : (MODE) != QImode)                                                 \
96    && ! (REGNO == 2 && GET_MODE_UNIT_SIZE (MODE) > 4))
97
98 /* Output assembler code to FILE to increment profiler label # LABELNO
99    for profiling a function entry. */
100
101 #undef FUNCTION_PROFILER
102 #define FUNCTION_PROFILER(FILE, LABELNO)  \
103    fprintf (FILE, "\tmovl $.LP%d,%%eax\n\tcall mcount\n", (LABELNO));
104
105 /* Assembler pseudo-op for shared data segment. */
106 #define SHARED_SECTION_ASM_OP "\t.shdata"
107
108 /* A C statement or statements which output an assembler instruction
109    opcode to the stdio stream STREAM.  The macro-operand PTR is a
110    variable of type `char *' which points to the opcode name in its
111    "internal" form--the form that is written in the machine description.
112
113    The Sequent assembler (identified as "Balance 8000 Assembler
114    07/17/85 3.90" by "as -v") does not understand the `movs[bwl]' string
115    move mnemonics - it uses `smov[bwl]' instead.  Change "movs" into
116    "smov", carefully avoiding the sign-extend opcodes.  */
117
118 #define ASM_OUTPUT_OPCODE(STREAM, PTR)  \
119 {                                                                       \
120   if ((PTR)[0] == 'm'                                                   \
121       && (PTR)[1] == 'o'                                                \
122       && (PTR)[2] == 'v'                                                \
123       && (PTR)[3] == 's'                                                \
124       && ((PTR)[4] == 'b' || (PTR)[4] == 'w' || (PTR)[4] == 'l')        \
125       && ((PTR)[5] == ' ' || (PTR)[5] == '\t'|| (PTR)[5] == '\0'))      \
126     {                                                                   \
127       fprintf (STREAM, "smov");                                         \
128       (PTR) += 4;                                                       \
129     }                                                                   \
130 }
131
132 /* 10-Aug-92 pes  Local labels are prefixed with ".L" */
133 #undef LPREFIX
134 #define LPREFIX ".L"
135
136 #undef ASM_GENERATE_INTERNAL_LABEL
137 #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)\
138   sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER))
139
140 #undef ASM_OUTPUT_INTERNAL_LABEL
141 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)\
142   fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
143
144 /* The native compiler passes the address of the returned structure in eax. */
145 #undef STRUCT_VALUE
146 #undef STRUCT_VALUE_INCOMING
147 #define STRUCT_VALUE_REGNUM     0