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