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
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 ROMBAR, /* mcf5200 added these */
110 #define last_movec_reg MBAR
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. */
202 /* The type of a PIC expression. */
206 pic_none, /* not pic */
207 pic_plt_pcrel, /* @PLTPC */
208 pic_got_pcrel, /* @GOTPC */
209 pic_plt_off, /* @PLT */
210 pic_got_off /* @GOT */
214 /* The structure used to hold information about an expression. */
218 /* The size to use. */
222 /* The type of pic relocation if any. */
223 enum pic_relocation pic_reloc;
226 /* The expression itself. */
230 /* The operand modes. */
232 enum m68k_operand_type
250 /* The structure used to hold a parsed operand. */
254 /* The type of operand. */
255 enum m68k_operand_type mode;
257 /* The main register. */
258 enum m68k_register reg;
260 /* The register mask for mode REGLST. */
263 /* An error message. */
266 /* The index register. */
267 struct m68k_indexreg index;
269 /* The displacement. */
270 struct m68k_exp disp;
272 /* The outer displacement. */
273 struct m68k_exp odisp;
276 #endif /* ! defined (M68K_PARSE_H) */
278 /* The parsing function. */
280 extern int m68k_ip_op PARAMS ((char *, struct m68k_op *));
282 /* Whether register prefixes are optional. */
283 extern int flag_reg_prefix_optional;