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. */
47 DATA0 = 1, /* 1- 8 == data registers 0-7 */
65 FP0, /* Eight FP registers */
74 /* Note that COP0==processor #1 -- COP0+7==#8, which stores as 000 */
77 COP0, /* Co-processor #1-#8 */
86 PC, /* Program counter */
87 ZPC, /* Hack for Program space, but 0 addressing */
89 CCR, /* Condition code Reg */
91 /* These have to be grouped together for the movec instruction to work. */
92 USP, /* User Stack Pointer */
93 ISP, /* Interrupt stack pointer */
108 BUSCR, /* 68060 added these */
110 #define last_movec_reg PCR
111 /* end of movec ordering constraints */
117 DRP, /* 68851 or 68030 MMU regs */
139 PSR, /* aka MMUSR on 68030 (but not MMUSR on 68040)
140 and ACUSR on 68ec030 */
143 IC, /* instruction cache token */
144 DC, /* data cache token */
145 NC, /* no cache token */
146 BC, /* both caches token */
148 TT0, /* 68030 access control unit regs */
151 ZDATA0, /* suppressed data registers. */
160 ZADDR0, /* suppressed address registers. */
170 /* Size information. */
180 /* Word (2 bytes). */
183 /* Longword (4 bytes). */
187 /* The structure used to hold information about an index register. */
191 /* The index register itself. */
192 enum m68k_register reg;
194 /* The size to use. */
197 /* The value to scale by. */
201 /* The structure used to hold information about an expression. */
205 /* The size to use. */
208 /* The expression itself. */
212 /* See whether an expression is a signed eight bit value. */
215 ((ex)->exp.X_op == O_constant \
216 && (ex)->exp.X_add_number >= -0x80 \
217 && (ex)->exp.X_add_number < 0x80)
219 /* See whether an expression is a signed sixteen bit value. */
222 ((ex)->exp.X_op == O_constant \
223 && (ex)->exp.X_add_number >= -0x8000 \
224 && (ex)->exp.X_add_number < 0x8000)
226 /* The operand modes. */
228 enum m68k_operand_type
246 /* The structure used to hold a parsed operand. */
250 /* The type of operand. */
251 enum m68k_operand_type mode;
253 /* The main register. */
254 enum m68k_register reg;
256 /* The register mask for mode REGLST. */
259 /* An error message. */
262 /* The index register. */
263 struct m68k_indexreg index;
265 /* The displacement. */
266 struct m68k_exp disp;
268 /* The outer displacement. */
269 struct m68k_exp odisp;
272 #endif /* ! defined (M68K_PARSE_H) */
274 /* The parsing function. */
276 extern int m68k_ip_op PARAMS ((char *, struct m68k_op *));
278 /* Whether register prefixes are optional. */
279 extern int flag_reg_prefix_optional;