1 /* m68k-parse.h -- header file for m68k assembler
2 Copyright (C) 1987, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
4 This file is part of GAS, the GNU Assembler.
6 GAS 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)
11 GAS 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.
16 You should have received a copy of the GNU General Public License
17 along with GAS; see the file COPYING. If not, write to the Free
18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
24 /* This header file defines things which are shared between the
25 operand parser in m68k.y and the m68k assembler proper in
28 /* The various m68k registers. */
30 /* DATA and ADDR have to be contiguous, so that reg-DATA gives
31 0-7==data reg, 8-15==addr reg for operands that take both types.
33 We don't use forms like "ADDR0 = ADDR" here because this file is
34 likely to be used on an Apollo, and the broken Apollo compiler
35 gives an `undefined variable' error if we do that, according to
36 troy@cbme.unsw.edu.au. */
46 DATA0 = 1, /* 1- 8 == data registers 0-7 */
64 FP0, /* Eight FP registers */
73 COP0, /* Co-processor #0-#7 */
82 PC, /* Program counter */
83 ZPC, /* Hack for Program space, but 0 addressing */
85 CCR, /* Condition code Reg */
87 /* These have to be grouped together for the movec instruction to work. */
88 USP, /* User Stack Pointer */
89 ISP, /* Interrupt stack pointer */
104 BUSCR, /* 68060 added these */
106 #define last_movec_reg PCR
107 /* end of movec ordering constraints */
113 DRP, /* 68851 or 68030 MMU regs */
135 PSR, /* aka MMUSR on 68030 (but not MMUSR on 68040)
136 and ACUSR on 68ec030 */
139 IC, /* instruction cache token */
140 DC, /* data cache token */
141 NC, /* no cache token */
142 BC, /* both caches token */
144 TT0, /* 68030 access control unit regs */
147 ZDATA0, /* suppressed data registers. */
156 ZADDR0, /* suppressed address registers. */
166 /* Size information. */
176 /* Word (2 bytes). */
179 /* Longword (4 bytes). */
183 /* The structure used to hold information about an index register. */
187 /* The index register itself. */
188 enum m68k_register reg;
190 /* The size to use. */
193 /* The value to scale by. */
197 /* The structure used to hold information about an expression. */
201 /* The size to use. */
204 /* The expression itself. */
208 /* See whether an expression is a signed eight bit value. */
211 ((ex)->exp.X_op == O_constant \
212 && (ex)->exp.X_add_number >= -0x80 \
213 && (ex)->exp.X_add_number < 0x80)
215 /* See whether an expression is a signed sixteen bit value. */
218 ((ex)->exp.X_op == O_constant \
219 && (ex)->exp.X_add_number >= -0x8000 \
220 && (ex)->exp.X_add_number < 0x8000)
222 /* The operand modes. */
224 enum m68k_operand_type
242 /* The structure used to hold a parsed operand. */
246 /* The type of operand. */
247 enum m68k_operand_type mode;
249 /* The main register. */
250 enum m68k_register reg;
252 /* The register mask for mode REGLST. */
255 /* An error message. */
258 /* The index register. */
259 struct m68k_indexreg index;
261 /* The displacement. */
262 struct m68k_exp disp;
264 /* The outer displacement. */
265 struct m68k_exp odisp;
268 #endif /* ! defined (M68K_PARSE_H) */
270 /* The parsing function. */
272 extern int m68k_ip_op PARAMS ((char *, struct m68k_op *));
274 /* Whether register prefixes are optional. */
275 extern int flag_reg_prefix_optional;