1 /* m68k-parse.h -- header file for m68k assembler
2 Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000
3 Free Software Foundation, Inc.
5 This file is part of GAS, the GNU Assembler.
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GAS is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
25 /* This header file defines things which are shared between the
26 operand parser in m68k.y and the m68k assembler proper in
29 /* The various m68k registers. */
31 /* DATA and ADDR have to be contiguous, so that reg-DATA gives
32 0-7==data reg, 8-15==addr reg for operands that take both types.
34 We don't use forms like "ADDR0 = ADDR" here because this file is
35 likely to be used on an Apollo, and the broken Apollo compiler
36 gives an `undefined variable' error if we do that, according to
37 troy@cbme.unsw.edu.au. */
47 DATA0
= 1, /* 1- 8 == data registers 0-7 */
65 FP0
, /* Eight FP registers */
74 COP0
, /* Co-processor #0-#7 */
83 PC
, /* Program counter */
84 ZPC
, /* Hack for Program space, but 0 addressing */
86 CCR
, /* Condition code Reg */
87 ACC
, /* Accumulator Reg */
88 MACSR
, /* MAC Status Reg */
89 MASK
, /* Modulus 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 ROMBAR
, /* mcf5200 added these */
114 #define last_movec_reg MBAR
115 /* end of movec ordering constraints */
121 DRP
, /* 68851 or 68030 MMU regs */
143 PSR
, /* aka MMUSR on 68030 (but not MMUSR on 68040)
144 and ACUSR on 68ec030 */
147 IC
, /* instruction cache token */
148 DC
, /* data cache token */
149 NC
, /* no cache token */
150 BC
, /* both caches token */
152 TT0
, /* 68030 access control unit regs */
155 ZDATA0
, /* suppressed data registers. */
164 ZADDR0
, /* suppressed address registers. */
173 /* Upper and lower half of data and address registers. Order *must*
174 be DATAxL, ADDRxL, DATAxU, ADDRxU. */
175 DATA0L
, /* lower half of data registers */
184 ADDR0L
, /* lower half of address registers */
193 DATA0U
, /* upper half of data registers */
202 ADDR0U
, /* upper half of address registers */
212 /* Size information. */
222 /* Word (2 bytes). */
225 /* Longword (4 bytes). */
229 /* The structure used to hold information about an index register. */
233 /* The index register itself. */
234 enum m68k_register reg
;
236 /* The size to use. */
239 /* The value to scale by. */
244 /* The type of a PIC expression. */
248 pic_none
, /* not pic */
249 pic_plt_pcrel
, /* @PLTPC */
250 pic_got_pcrel
, /* @GOTPC */
251 pic_plt_off
, /* @PLT */
252 pic_got_off
/* @GOT */
256 /* The structure used to hold information about an expression. */
260 /* The size to use. */
264 /* The type of pic relocation if any. */
265 enum pic_relocation pic_reloc
;
268 /* The expression itself. */
272 /* The operand modes. */
274 enum m68k_operand_type
292 /* The structure used to hold a parsed operand. */
296 /* The type of operand. */
297 enum m68k_operand_type mode
;
299 /* The main register. */
300 enum m68k_register reg
;
302 /* The register mask for mode REGLST. */
305 /* An error message. */
308 /* The index register. */
309 struct m68k_indexreg index
;
311 /* The displacement. */
312 struct m68k_exp disp
;
314 /* The outer displacement. */
315 struct m68k_exp odisp
;
318 #endif /* ! defined (M68K_PARSE_H) */
320 /* The parsing function. */
322 extern int m68k_ip_op
PARAMS ((char *, struct m68k_op
*));
324 /* Whether register prefixes are optional. */
325 extern int flag_reg_prefix_optional
;