1 /* mn10300.h -- Header file for Matsushita 10300 opcode table
2 Copyright 1996 Free Software Foundation, Inc.
3 Written by Jeff Law, Cygnus Support
5 This file is part of GDB, GAS, and the GNU binutils.
7 GDB, GAS, and the GNU binutils are free software; you can redistribute
8 them and/or modify them under the terms of the GNU General Public
9 License as published by the Free Software Foundation; either version
10 1, or (at your option) any later version.
12 GDB, GAS, and the GNU binutils are distributed in the hope that they
13 will be useful, but WITHOUT ANY WARRANTY; without even the implied
14 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
15 the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this file; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 /* The opcode table is an array of struct mn10300_opcode. */
28 /* The opcode name. */
31 /* The opcode itself. Those bits which will be filled in with
32 operands are zeroes. */
35 /* The opcode mask. This is used by the disassembler. This is a
36 mask containing ones indicating those bits which must match the
37 opcode field, and zeroes indicating those bits which need not
38 match (and are presumably filled in by operands). */
41 /* The format of this opcode. */
44 /* An array of operand codes. Each code is an index into the
45 operand table. They appear in the order which the operands must
46 appear in assembly code, and are terminated by a zero. */
47 unsigned char operands[8];
50 /* The table itself is sorted by major opcode number, and is otherwise
51 in the order in which the disassembler should consider
53 extern const struct mn10300_opcode mn10300_opcodes[];
54 extern const int mn10300_num_opcodes;
57 /* The operands table is an array of struct powerpc_operand. */
59 struct mn10300_operand
61 /* The number of bits in the operand. */
64 /* How far the operand is left shifted in the instruction. */
67 /* One bit syntax flags. */
71 /* Elements in the table are retrieved by indexing with values from
72 the operands field of the mn10300_opcodes table. */
74 extern const struct mn10300_operand mn10300_operands[];
76 /* Values defined for the flags field of a struct mn10300_operand. */
77 #define MN10300_OPERAND_DREG 0x1
79 #define MN10300_OPERAND_AREG 0x2
81 #define MN10300_OPERAND_SP 0x4
83 #define MN10300_OPERAND_PSW 0x8
85 #define MN10300_OPERAND_MDR 0x10
87 #define MN10300_OPERAND_SIGNED 0x20
89 #define MN10300_OPERAND_PROMOTE 0x40
91 #define MN10300_OPERAND_PAREN 0x80
93 #define MN10300_OPERAND_REPEATED 0x100
95 #define MN10300_OPERAND_EXTENDED 0x200
109 #endif /* MN10300_H */