1999-05-03 07:29:11 +00:00
|
|
|
/* m68k-parse.h -- header file for m68k assembler
|
2003-10-21 13:28:59 +00:00
|
|
|
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000,
|
2009-09-02 07:25:43 +00:00
|
|
|
2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
|
1999-05-03 07:29:11 +00:00
|
|
|
|
|
|
|
This file is part of GAS, the GNU Assembler.
|
|
|
|
|
|
|
|
GAS is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-07-03 11:01:12 +00:00
|
|
|
the Free Software Foundation; either version 3, or (at your option)
|
1999-05-03 07:29:11 +00:00
|
|
|
any later version.
|
|
|
|
|
|
|
|
GAS is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with GAS; see the file COPYING. If not, write to the Free
|
2005-05-05 09:13:19 +00:00
|
|
|
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
|
|
|
02110-1301, USA. */
|
1999-05-03 07:29:11 +00:00
|
|
|
|
|
|
|
#ifndef M68K_PARSE_H
|
|
|
|
#define M68K_PARSE_H
|
|
|
|
|
|
|
|
/* This header file defines things which are shared between the
|
|
|
|
operand parser in m68k.y and the m68k assembler proper in
|
|
|
|
tc-m68k.c. */
|
|
|
|
|
|
|
|
/* The various m68k registers. */
|
|
|
|
|
|
|
|
/* DATA and ADDR have to be contiguous, so that reg-DATA gives
|
|
|
|
0-7==data reg, 8-15==addr reg for operands that take both types.
|
|
|
|
|
|
|
|
We don't use forms like "ADDR0 = ADDR" here because this file is
|
|
|
|
likely to be used on an Apollo, and the broken Apollo compiler
|
|
|
|
gives an `undefined variable' error if we do that, according to
|
|
|
|
troy@cbme.unsw.edu.au. */
|
|
|
|
|
|
|
|
#define DATA DATA0
|
|
|
|
#define ADDR ADDR0
|
|
|
|
#define SP ADDR7
|
|
|
|
#define BAD BAD0
|
|
|
|
#define BAC BAC0
|
|
|
|
|
|
|
|
enum m68k_register
|
|
|
|
{
|
|
|
|
DATA0 = 1, /* 1- 8 == data registers 0-7 */
|
|
|
|
DATA1,
|
|
|
|
DATA2,
|
|
|
|
DATA3,
|
|
|
|
DATA4,
|
|
|
|
DATA5,
|
|
|
|
DATA6,
|
|
|
|
DATA7,
|
|
|
|
|
|
|
|
ADDR0,
|
|
|
|
ADDR1,
|
|
|
|
ADDR2,
|
|
|
|
ADDR3,
|
|
|
|
ADDR4,
|
|
|
|
ADDR5,
|
|
|
|
ADDR6,
|
|
|
|
ADDR7,
|
|
|
|
|
|
|
|
FP0, /* Eight FP registers */
|
|
|
|
FP1,
|
|
|
|
FP2,
|
|
|
|
FP3,
|
|
|
|
FP4,
|
|
|
|
FP5,
|
|
|
|
FP6,
|
|
|
|
FP7,
|
|
|
|
|
|
|
|
COP0, /* Co-processor #0-#7 */
|
|
|
|
COP1,
|
|
|
|
COP2,
|
|
|
|
COP3,
|
|
|
|
COP4,
|
|
|
|
COP5,
|
|
|
|
COP6,
|
|
|
|
COP7,
|
|
|
|
|
|
|
|
PC, /* Program counter */
|
|
|
|
ZPC, /* Hack for Program space, but 0 addressing */
|
|
|
|
SR, /* Status Reg */
|
|
|
|
CCR, /* Condition code Reg */
|
2004-04-22 10:33:16 +00:00
|
|
|
ACC, /* Accumulator Reg0 (EMAC or ACC on MAC). */
|
|
|
|
ACC1, /* Accumulator Reg 1 (EMAC). */
|
|
|
|
ACC2, /* Accumulator Reg 2 (EMAC). */
|
|
|
|
ACC3, /* Accumulator Reg 3 (EMAC). */
|
|
|
|
ACCEXT01, /* Accumulator extension 0&1 (EMAC). */
|
|
|
|
ACCEXT23, /* Accumulator extension 2&3 (EMAC). */
|
1999-05-28 Torbjorn Granlund <tege@matematik.su.se>
* config/tc-m68k.c (m68k_ip): Check for disallowed index register
width for Coldfire.
(arch_coldfire_p): New #define.
(m68k_ip, m68k_init_after_args): Use arch_coldfire_p.
1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
* config/tc-m68k.c (install_operand): Add places `n', `o'.
* config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'.
(install_operand): Add place `N'.
(init_table): Add registers ACC, MACSR, MASK.
* config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK.
* config/tc-m68k.c: Change mcf5200 --> mcf.
(archs): Add mcf5206e, mcf5307.
(m68k_ip): Add format `u'.
(install_operand): Add place `m', `M', `h'.
(init_table): Add upper/lower registers.
* config/m68k-parse.h (m68k_register): Add upper/lower registers.
1999-05-27 22:36:51 +00:00
|
|
|
MACSR, /* MAC Status Reg */
|
|
|
|
MASK, /* Modulus Reg */
|
1999-05-03 07:29:11 +00:00
|
|
|
|
2000-11-14 20:57:30 +00:00
|
|
|
/* These have to be grouped together for the movec instruction to work. */
|
1999-05-03 07:29:11 +00:00
|
|
|
USP, /* User Stack Pointer */
|
|
|
|
ISP, /* Interrupt stack pointer */
|
|
|
|
SFC,
|
|
|
|
DFC,
|
|
|
|
CACR,
|
|
|
|
VBR,
|
|
|
|
CAAR,
|
gas/
* config/tc-m68k.c (mcf51qe_ctrl): Add CPUCR.
(mcf52259_ctrl, mcf52277_ctrl, mcf53017_ctrl): New.
(mcf5307_ctrl): Add VBR.
(no_mac): New variable.
(m68k_extensions): Refer to no_mac mask.
(m68k_cpus): Add 51, 51ac, 51cn, 51em, 51jm, 52274, 52277,
52252..52259, 53011..53017.
(m68k_ip): Process CPUCR.
(init_table): Add cpucr entry.
(m68k_set_extension): Allow negated mask to refer to a variable.
(md_show_usage): Use '%s' to silence fprintf warning.
* config/m68k-parse.h (CPUCR): New control register.
gas/testsuite/
* m68k/br-isac.d, m68k/br-isac.s: Add stldsr test.
opcodes/
* m68k-opc.c (m68k_opcodes): Add stldsr instruction.
2009-02-12 08:31:03 +00:00
|
|
|
CPUCR,
|
1999-05-03 07:29:11 +00:00
|
|
|
MSP,
|
|
|
|
ITT0,
|
|
|
|
ITT1,
|
|
|
|
DTT0,
|
|
|
|
DTT1,
|
|
|
|
MMUSR,
|
|
|
|
TC,
|
|
|
|
SRP,
|
|
|
|
URP,
|
2003-10-21 13:28:59 +00:00
|
|
|
BUSCR, /* 68060 added these. */
|
1999-05-03 07:29:11 +00:00
|
|
|
PCR,
|
2003-10-21 13:28:59 +00:00
|
|
|
ROMBAR, /* mcf5200 added these. */
|
gas/
* config/m68k-parse.h (RAMBAR_ALT): New.
* config/tc-m68k.c (mcf5206_ctrl, mcf5307_ctrl): New.
(mcf_ctrl, mcf5208_ctrl, mcf5210a_ctrl, mcf5213_ctrl, mcf52235_ctrl,
mcf5225_ctrl, mcf5235_ctrl, mcf5271_ctrl, mcf5275_ctrl,
mcf5282_ctrl, mcf5329_ctrl, mcf5373_ctrl, mcfv4e_ctrl,
mcf5475_ctrl, mcf5485_ctrl): Add RAMBAR synonym for
RAMBAR1.
(mcf5272_ctrl): Add RAMBAR0, replace add RAMBAR with RAMBAR_ALT.
(m68k_cpus): Adjust 5206, 5206e & 5307 entries.
(m68k_ip) <Case J>: Detect when RAMBAR_ALT should be used. Add it
to control register mapping.
gas/testsuite/
* gas/m68k/ctrl-1.d, gas/m68k/ctrl-1.s: New.
* gas/m68k/ctrl-2.d, gas/m68k/ctrl-2.s: New.
* gas/m68k/all.exp: Add them.
opcodes/
* m68k-dis.c (print_insn_arg): Show c04 as rambar0 and c05 as
rambar1.
2007-04-20 14:09:00 +00:00
|
|
|
RAMBAR_ALT, /* Some CF chips have RAMBAR using
|
|
|
|
RAMBAR0's number */
|
1999-05-03 07:29:11 +00:00
|
|
|
RAMBAR0,
|
|
|
|
RAMBAR1,
|
2003-10-21 13:28:59 +00:00
|
|
|
MMUBAR, /* mcfv4e added these. */
|
2007-02-15 18:37:08 +00:00
|
|
|
ROMBAR0, /* mcfv4e added these. */
|
2003-10-21 13:28:59 +00:00
|
|
|
ROMBAR1, /* mcfv4e added these. */
|
|
|
|
MPCR, EDRAMBAR, SECMBAR, /* mcfv4e added these. */
|
|
|
|
PCR1U0, PCR1L0, PCR1U1, PCR1L1,/* mcfv4e added these. */
|
|
|
|
PCR2U0, PCR2L0, PCR2U1, PCR2L1,/* mcfv4e added these. */
|
|
|
|
PCR3U0, PCR3L0, PCR3U1, PCR3L1,/* mcfv4e added these. */
|
|
|
|
MBAR0, MBAR1, /* mcfv4e added these. */
|
|
|
|
ACR0, ACR1, ACR2, ACR3, /* mcf5200 added these. */
|
2009-11-10 18:05:24 +00:00
|
|
|
ACR4, ACR5, ACR6, ACR7, /* mcf54418 added these. */
|
2003-10-21 13:28:59 +00:00
|
|
|
FLASHBAR, RAMBAR, /* mcf528x added these. */
|
2004-10-08 08:45:54 +00:00
|
|
|
MBAR2, /* mcf5249 added this. */
|
1999-05-03 07:29:11 +00:00
|
|
|
MBAR,
|
2009-11-10 18:05:24 +00:00
|
|
|
RGPIOBAR, /* mcf54418 added this. */
|
2007-02-15 18:37:08 +00:00
|
|
|
ASID, /* m5475. */
|
2006-12-27 07:15:02 +00:00
|
|
|
CAC, /* fido added this. */
|
2007-09-27 11:14:10 +00:00
|
|
|
MBO,
|
|
|
|
#define last_movec_reg MBO
|
2003-10-21 13:28:59 +00:00
|
|
|
/* End of movec ordering constraints. */
|
1999-05-03 07:29:11 +00:00
|
|
|
|
|
|
|
FPI,
|
|
|
|
FPS,
|
|
|
|
FPC,
|
|
|
|
|
|
|
|
DRP, /* 68851 or 68030 MMU regs */
|
|
|
|
CRP,
|
|
|
|
CAL,
|
|
|
|
VAL,
|
|
|
|
SCC,
|
|
|
|
AC,
|
|
|
|
BAD0,
|
|
|
|
BAD1,
|
|
|
|
BAD2,
|
|
|
|
BAD3,
|
|
|
|
BAD4,
|
|
|
|
BAD5,
|
|
|
|
BAD6,
|
|
|
|
BAD7,
|
|
|
|
BAC0,
|
|
|
|
BAC1,
|
|
|
|
BAC2,
|
|
|
|
BAC3,
|
|
|
|
BAC4,
|
|
|
|
BAC5,
|
|
|
|
BAC6,
|
|
|
|
BAC7,
|
|
|
|
PSR, /* aka MMUSR on 68030 (but not MMUSR on 68040)
|
|
|
|
and ACUSR on 68ec030 */
|
|
|
|
PCSR,
|
|
|
|
|
|
|
|
IC, /* instruction cache token */
|
|
|
|
DC, /* data cache token */
|
|
|
|
NC, /* no cache token */
|
|
|
|
BC, /* both caches token */
|
|
|
|
|
|
|
|
TT0, /* 68030 access control unit regs */
|
|
|
|
TT1,
|
|
|
|
|
|
|
|
ZDATA0, /* suppressed data registers. */
|
|
|
|
ZDATA1,
|
|
|
|
ZDATA2,
|
|
|
|
ZDATA3,
|
|
|
|
ZDATA4,
|
|
|
|
ZDATA5,
|
|
|
|
ZDATA6,
|
|
|
|
ZDATA7,
|
|
|
|
|
|
|
|
ZADDR0, /* suppressed address registers. */
|
|
|
|
ZADDR1,
|
|
|
|
ZADDR2,
|
|
|
|
ZADDR3,
|
|
|
|
ZADDR4,
|
|
|
|
ZADDR5,
|
|
|
|
ZADDR6,
|
|
|
|
ZADDR7,
|
1999-05-28 Torbjorn Granlund <tege@matematik.su.se>
* config/tc-m68k.c (m68k_ip): Check for disallowed index register
width for Coldfire.
(arch_coldfire_p): New #define.
(m68k_ip, m68k_init_after_args): Use arch_coldfire_p.
1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
* config/tc-m68k.c (install_operand): Add places `n', `o'.
* config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'.
(install_operand): Add place `N'.
(init_table): Add registers ACC, MACSR, MASK.
* config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK.
* config/tc-m68k.c: Change mcf5200 --> mcf.
(archs): Add mcf5206e, mcf5307.
(m68k_ip): Add format `u'.
(install_operand): Add place `m', `M', `h'.
(init_table): Add upper/lower registers.
* config/m68k-parse.h (m68k_register): Add upper/lower registers.
1999-05-27 22:36:51 +00:00
|
|
|
|
|
|
|
/* Upper and lower half of data and address registers. Order *must*
|
2000-11-14 20:57:30 +00:00
|
|
|
be DATAxL, ADDRxL, DATAxU, ADDRxU. */
|
1999-05-28 Torbjorn Granlund <tege@matematik.su.se>
* config/tc-m68k.c (m68k_ip): Check for disallowed index register
width for Coldfire.
(arch_coldfire_p): New #define.
(m68k_ip, m68k_init_after_args): Use arch_coldfire_p.
1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
* config/tc-m68k.c (install_operand): Add places `n', `o'.
* config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'.
(install_operand): Add place `N'.
(init_table): Add registers ACC, MACSR, MASK.
* config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK.
* config/tc-m68k.c: Change mcf5200 --> mcf.
(archs): Add mcf5206e, mcf5307.
(m68k_ip): Add format `u'.
(install_operand): Add place `m', `M', `h'.
(init_table): Add upper/lower registers.
* config/m68k-parse.h (m68k_register): Add upper/lower registers.
1999-05-27 22:36:51 +00:00
|
|
|
DATA0L, /* lower half of data registers */
|
|
|
|
DATA1L,
|
|
|
|
DATA2L,
|
|
|
|
DATA3L,
|
|
|
|
DATA4L,
|
|
|
|
DATA5L,
|
|
|
|
DATA6L,
|
|
|
|
DATA7L,
|
|
|
|
|
|
|
|
ADDR0L, /* lower half of address registers */
|
|
|
|
ADDR1L,
|
|
|
|
ADDR2L,
|
|
|
|
ADDR3L,
|
|
|
|
ADDR4L,
|
|
|
|
ADDR5L,
|
|
|
|
ADDR6L,
|
|
|
|
ADDR7L,
|
|
|
|
|
|
|
|
DATA0U, /* upper half of data registers */
|
|
|
|
DATA1U,
|
|
|
|
DATA2U,
|
|
|
|
DATA3U,
|
|
|
|
DATA4U,
|
|
|
|
DATA5U,
|
|
|
|
DATA6U,
|
|
|
|
DATA7U,
|
|
|
|
|
|
|
|
ADDR0U, /* upper half of address registers */
|
|
|
|
ADDR1U,
|
|
|
|
ADDR2U,
|
|
|
|
ADDR3U,
|
|
|
|
ADDR4U,
|
|
|
|
ADDR5U,
|
|
|
|
ADDR6U,
|
|
|
|
ADDR7U,
|
1999-05-03 07:29:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Size information. */
|
|
|
|
|
|
|
|
enum m68k_size
|
|
|
|
{
|
|
|
|
/* Unspecified. */
|
|
|
|
SIZE_UNSPEC,
|
|
|
|
|
|
|
|
/* Byte. */
|
|
|
|
SIZE_BYTE,
|
|
|
|
|
|
|
|
/* Word (2 bytes). */
|
|
|
|
SIZE_WORD,
|
|
|
|
|
|
|
|
/* Longword (4 bytes). */
|
|
|
|
SIZE_LONG
|
|
|
|
};
|
|
|
|
|
|
|
|
/* The structure used to hold information about an index register. */
|
|
|
|
|
|
|
|
struct m68k_indexreg
|
|
|
|
{
|
|
|
|
/* The index register itself. */
|
|
|
|
enum m68k_register reg;
|
|
|
|
|
|
|
|
/* The size to use. */
|
|
|
|
enum m68k_size size;
|
|
|
|
|
|
|
|
/* The value to scale by. */
|
|
|
|
int scale;
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef OBJ_ELF
|
|
|
|
/* The type of a PIC expression. */
|
|
|
|
|
|
|
|
enum pic_relocation
|
|
|
|
{
|
|
|
|
pic_none, /* not pic */
|
|
|
|
pic_plt_pcrel, /* @PLTPC */
|
|
|
|
pic_got_pcrel, /* @GOTPC */
|
|
|
|
pic_plt_off, /* @PLT */
|
M68K TLS support.
ld/testsuite/
* ld-m68k/got-multigot-12-13-14-34-35-ok.d: Update.
* ld-m68k/got-multigot-14-ok.d: Update.
* ld-m68k/m68k-got.exp: Update.
* ld-m68k/got-negative-12-13-14-34-ok.d: Update.
* ld-m68k/got-negative-14-ok.d: Update.
* ld-m68k/tls-gd-1.d, ld-m68k/tls-gd-2.d: New tests.
* ld-m68k/tls-gd-ie-1.d, ld-m68k/tls-ie-1.d: New tests.
* ld-m68k/tls-ld-1.d, ld-m68k/tls-ld-2.d: New tests.
* ld-m68k/tls-ld-1.s, ld-m68k/tls-ld-2.s, ld-m68k/tls-le-1.s:
New test sources.
* ld-m68k/tls-no-1.s, ld-m68k/tls-gd-ie-1.s, ld-m68k/tls-gd-1.s:
New test sources.
* ld-m68k/tls-gd-2.s, ld-m68k/tls-ie-1.s: New test sources.
* ld-m68k/m68k.exp: Run new tests.
(merge isa-a isa-a:nodiv): Fix.
gas/testsuite/
* gas/m68k/tls-gd-3.d, gas/m68k/tls-gd-3.s: New test.
* gas/m68k/all.exp: Run it.
gas/
* config/m68k-parse.h (enum pic_relocation): Add values for TLS
relocations.
* config/m68k-parse.y (yylex): Parse TLS relocations.
* config/tc-m68k.c (m68k_elf_cons): New static function.
(md_pseudo_table): Use it.
(get_reloc_code, tc_m68k_fix_adjustable, tc_gen_reloc): Handle TLS
relocations.
(md_apply_fix): Fix to set thread local flag.
(m68k_elf_suffix): New static function; helper for m68k_elf_cons.
include/elf/
* m68k.h: Map TLS relocations to numbers.
bfd/
* bfd-in2.h: Regenerate.
* elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
fields from n_entries to n_slots where appropriate, update comments.
(HOWTO): Add TLS relocations.
(reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
(enum elf_m68k_got_offset_size): New enum.
(struct elf_m68k_got_entry.type): Move field to ...
(struct elf_m68k_got_entry_key): ... here. Update all uses.
(elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
functions.
(elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
functions.
(struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
fields into n_entries array. Update comments.
(elf_m68k_init_got): Simplify, update all uses.
(elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
(ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
GOT entries; update name, update all uses.
(ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
(elf_m68k_get_got_entry): Update.
(elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
simplify.
(elf_m68k_remove_got_entry_type): Simplify.
(elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
(elf_m68k_can_merge_gots): Update.
(elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
(struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
GOT entries, simplify.
(elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
(struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
field, remove obsoleted local_n_entries field.
(elf_m68k_partition_multi_got_2): New static function.
(elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
update.
(elf_m68k_remove_got_entry_type): Update.
(elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
(elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
update of sgot->size and srelgot->size.
(elf_m68k_gc_sweep_hook): Update.
(elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
(elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
TLS relocations.
* reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
* libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
2009-02-03 14:36:47 +00:00
|
|
|
pic_got_off, /* @GOT */
|
|
|
|
pic_tls_gd, /* @TLSGD */
|
|
|
|
pic_tls_ldm, /* @TLSLDM */
|
|
|
|
pic_tls_ldo, /* @TLSLDO */
|
|
|
|
pic_tls_ie, /* @TLSIE */
|
|
|
|
pic_tls_le /* @TLSLE */
|
1999-05-03 07:29:11 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The structure used to hold information about an expression. */
|
|
|
|
|
|
|
|
struct m68k_exp
|
|
|
|
{
|
|
|
|
/* The size to use. */
|
|
|
|
enum m68k_size size;
|
|
|
|
|
|
|
|
#ifdef OBJ_ELF
|
|
|
|
/* The type of pic relocation if any. */
|
|
|
|
enum pic_relocation pic_reloc;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The expression itself. */
|
|
|
|
expressionS exp;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* The operand modes. */
|
|
|
|
|
|
|
|
enum m68k_operand_type
|
|
|
|
{
|
|
|
|
IMMED = 1,
|
|
|
|
ABSL,
|
|
|
|
DREG,
|
|
|
|
AREG,
|
|
|
|
FPREG,
|
|
|
|
CONTROL,
|
|
|
|
AINDR,
|
|
|
|
AINC,
|
|
|
|
ADEC,
|
|
|
|
DISP,
|
|
|
|
BASE,
|
|
|
|
POST,
|
|
|
|
PRE,
|
2004-04-22 10:33:16 +00:00
|
|
|
LSH, /* MAC/EMAC scalefactor '<<'. */
|
|
|
|
RSH, /* MAC/EMAC scalefactor '>>'. */
|
1999-05-03 07:29:11 +00:00
|
|
|
REGLST
|
|
|
|
};
|
|
|
|
|
|
|
|
/* The structure used to hold a parsed operand. */
|
|
|
|
|
|
|
|
struct m68k_op
|
|
|
|
{
|
|
|
|
/* The type of operand. */
|
|
|
|
enum m68k_operand_type mode;
|
|
|
|
|
|
|
|
/* The main register. */
|
|
|
|
enum m68k_register reg;
|
|
|
|
|
|
|
|
/* The register mask for mode REGLST. */
|
|
|
|
unsigned long mask;
|
|
|
|
|
|
|
|
/* An error message. */
|
|
|
|
const char *error;
|
|
|
|
|
|
|
|
/* The index register. */
|
|
|
|
struct m68k_indexreg index;
|
|
|
|
|
|
|
|
/* The displacement. */
|
|
|
|
struct m68k_exp disp;
|
|
|
|
|
|
|
|
/* The outer displacement. */
|
|
|
|
struct m68k_exp odisp;
|
2004-04-22 10:33:16 +00:00
|
|
|
|
|
|
|
/* Is a trailing '&' added to an <ea>? (for MAC/EMAC mask addressing). */
|
|
|
|
int trailing_ampersand;
|
1999-05-03 07:29:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* ! defined (M68K_PARSE_H) */
|
|
|
|
|
|
|
|
/* The parsing function. */
|
|
|
|
|
2005-06-23 11:40:29 +00:00
|
|
|
extern int m68k_ip_op (char *, struct m68k_op *);
|
1999-05-03 07:29:11 +00:00
|
|
|
|
|
|
|
/* Whether register prefixes are optional. */
|
|
|
|
extern int flag_reg_prefix_optional;
|