* v850.h: New file.
[external/binutils.git] / include / opcode / v850.h
1 /* v850.h -- Header file for NEC V850 opcode table
2    Copyright 1996 Free Software Foundation, Inc.
3    Written by J.T. Conklin, Cygnus Support
4
5 This file is part of GDB, GAS, and the GNU binutils.
6
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.
11
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.
16
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.  */
20
21 #ifndef V850_H
22 #define V850_H
23
24 /* The opcode table is an array of struct v850_opcode.  */
25
26 struct v850_opcode
27 {
28   /* The opcode name.  */
29   const char *name;
30
31   /* The opcode itself.  Those bits which will be filled in with
32      operands are zeroes.  */
33   unsigned long opcode;
34
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).  */
39   unsigned long mask;
40
41   /* An array of operand codes.  Each code is an index into the
42      operand table.  They appear in the order which the operands must
43      appear in assembly code, and are terminated by a zero.  */
44   unsigned char operands[8];
45 };
46
47 /* The table itself is sorted by major opcode number, and is otherwise
48    in the order in which the disassembler should consider
49    instructions.  */
50 extern const struct v850_opcode v850_opcodes[];
51 extern const int v850_num_opcodes;
52
53 \f
54 /* The operands table is an array of struct powerpc_operand.  */
55
56 struct v850_operand
57 {
58   /* The number of bits in the operand.  */
59   int bits;
60
61   /* How far the operand is left shifted in the instruction.  */
62   int shift;
63 };
64
65 /* Elements in the table are retrieved by indexing with values from
66    the operands field of the v850_opcodes table.  */
67
68 extern const struct v850_operand v850_operands[];
69
70
71 #endif /* V850_H */