1 |
24 |
jeremybenn |
/* Instruction opcode header for xstormy16.
|
2 |
|
|
|
3 |
|
|
THIS FILE IS MACHINE GENERATED WITH CGEN.
|
4 |
|
|
|
5 |
|
|
Copyright 1996-2007 Free Software Foundation, Inc.
|
6 |
|
|
|
7 |
|
|
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
|
8 |
|
|
|
9 |
|
|
This file is free software; you can redistribute it and/or modify
|
10 |
|
|
it under the terms of the GNU General Public License as published by
|
11 |
|
|
the Free Software Foundation; either version 3, or (at your option)
|
12 |
|
|
any later version.
|
13 |
|
|
|
14 |
|
|
It is distributed in the hope that it will be useful, but WITHOUT
|
15 |
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
|
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
17 |
|
|
License for more details.
|
18 |
|
|
|
19 |
|
|
You should have received a copy of the GNU General Public License along
|
20 |
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
21 |
|
|
51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
22 |
|
|
|
23 |
|
|
*/
|
24 |
|
|
|
25 |
|
|
#ifndef XSTORMY16_OPC_H
|
26 |
|
|
#define XSTORMY16_OPC_H
|
27 |
|
|
|
28 |
|
|
/* -- opc.h */
|
29 |
|
|
|
30 |
|
|
/* Allows reason codes to be output when assembler errors occur. */
|
31 |
|
|
#define CGEN_VERBOSE_ASSEMBLER_ERRORS
|
32 |
|
|
|
33 |
|
|
/* We can't use the default hash size because many bits are used by
|
34 |
|
|
operands. */
|
35 |
|
|
#define CGEN_DIS_HASH_SIZE 1
|
36 |
|
|
#define CGEN_DIS_HASH(buf, value) 0
|
37 |
|
|
/* -- */
|
38 |
|
|
/* Enum declaration for xstormy16 instruction types. */
|
39 |
|
|
typedef enum cgen_insn_type {
|
40 |
|
|
XSTORMY16_INSN_INVALID, XSTORMY16_INSN_MOVLMEMIMM, XSTORMY16_INSN_MOVHMEMIMM, XSTORMY16_INSN_MOVLGRMEM
|
41 |
|
|
, XSTORMY16_INSN_MOVHGRMEM, XSTORMY16_INSN_MOVLMEMGR, XSTORMY16_INSN_MOVHMEMGR, XSTORMY16_INSN_MOVGRGRI
|
42 |
|
|
, XSTORMY16_INSN_MOVGRGRIPOSTINC, XSTORMY16_INSN_MOVGRGRIPREDEC, XSTORMY16_INSN_MOVGRIGR, XSTORMY16_INSN_MOVGRIPOSTINCGR
|
43 |
|
|
, XSTORMY16_INSN_MOVGRIPREDECGR, XSTORMY16_INSN_MOVGRGRII, XSTORMY16_INSN_MOVGRGRIIPOSTINC, XSTORMY16_INSN_MOVGRGRIIPREDEC
|
44 |
|
|
, XSTORMY16_INSN_MOVGRIIGR, XSTORMY16_INSN_MOVGRIIPOSTINCGR, XSTORMY16_INSN_MOVGRIIPREDECGR, XSTORMY16_INSN_MOVGRGR
|
45 |
|
|
, XSTORMY16_INSN_MOVWIMM8, XSTORMY16_INSN_MOVWGRIMM8, XSTORMY16_INSN_MOVWGRIMM16, XSTORMY16_INSN_MOVLOWGR
|
46 |
|
|
, XSTORMY16_INSN_MOVHIGHGR, XSTORMY16_INSN_MOVFGRGRI, XSTORMY16_INSN_MOVFGRGRIPOSTINC, XSTORMY16_INSN_MOVFGRGRIPREDEC
|
47 |
|
|
, XSTORMY16_INSN_MOVFGRIGR, XSTORMY16_INSN_MOVFGRIPOSTINCGR, XSTORMY16_INSN_MOVFGRIPREDECGR, XSTORMY16_INSN_MOVFGRGRII
|
48 |
|
|
, XSTORMY16_INSN_MOVFGRGRIIPOSTINC, XSTORMY16_INSN_MOVFGRGRIIPREDEC, XSTORMY16_INSN_MOVFGRIIGR, XSTORMY16_INSN_MOVFGRIIPOSTINCGR
|
49 |
|
|
, XSTORMY16_INSN_MOVFGRIIPREDECGR, XSTORMY16_INSN_MASKGRGR, XSTORMY16_INSN_MASKGRIMM16, XSTORMY16_INSN_PUSHGR
|
50 |
|
|
, XSTORMY16_INSN_POPGR, XSTORMY16_INSN_SWPN, XSTORMY16_INSN_SWPB, XSTORMY16_INSN_SWPW
|
51 |
|
|
, XSTORMY16_INSN_ANDGRGR, XSTORMY16_INSN_ANDIMM8, XSTORMY16_INSN_ANDGRIMM16, XSTORMY16_INSN_ORGRGR
|
52 |
|
|
, XSTORMY16_INSN_ORIMM8, XSTORMY16_INSN_ORGRIMM16, XSTORMY16_INSN_XORGRGR, XSTORMY16_INSN_XORIMM8
|
53 |
|
|
, XSTORMY16_INSN_XORGRIMM16, XSTORMY16_INSN_NOTGR, XSTORMY16_INSN_ADDGRGR, XSTORMY16_INSN_ADDGRIMM4
|
54 |
|
|
, XSTORMY16_INSN_ADDIMM8, XSTORMY16_INSN_ADDGRIMM16, XSTORMY16_INSN_ADCGRGR, XSTORMY16_INSN_ADCGRIMM4
|
55 |
|
|
, XSTORMY16_INSN_ADCIMM8, XSTORMY16_INSN_ADCGRIMM16, XSTORMY16_INSN_SUBGRGR, XSTORMY16_INSN_SUBGRIMM4
|
56 |
|
|
, XSTORMY16_INSN_SUBIMM8, XSTORMY16_INSN_SUBGRIMM16, XSTORMY16_INSN_SBCGRGR, XSTORMY16_INSN_SBCGRIMM4
|
57 |
|
|
, XSTORMY16_INSN_SBCGRIMM8, XSTORMY16_INSN_SBCGRIMM16, XSTORMY16_INSN_INCGRIMM2, XSTORMY16_INSN_DECGRIMM2
|
58 |
|
|
, XSTORMY16_INSN_RRCGRGR, XSTORMY16_INSN_RRCGRIMM4, XSTORMY16_INSN_RLCGRGR, XSTORMY16_INSN_RLCGRIMM4
|
59 |
|
|
, XSTORMY16_INSN_SHRGRGR, XSTORMY16_INSN_SHRGRIMM, XSTORMY16_INSN_SHLGRGR, XSTORMY16_INSN_SHLGRIMM
|
60 |
|
|
, XSTORMY16_INSN_ASRGRGR, XSTORMY16_INSN_ASRGRIMM, XSTORMY16_INSN_SET1GRIMM, XSTORMY16_INSN_SET1GRGR
|
61 |
|
|
, XSTORMY16_INSN_SET1LMEMIMM, XSTORMY16_INSN_SET1HMEMIMM, XSTORMY16_INSN_CLR1GRIMM, XSTORMY16_INSN_CLR1GRGR
|
62 |
|
|
, XSTORMY16_INSN_CLR1LMEMIMM, XSTORMY16_INSN_CLR1HMEMIMM, XSTORMY16_INSN_CBWGR, XSTORMY16_INSN_REVGR
|
63 |
|
|
, XSTORMY16_INSN_BCCGRGR, XSTORMY16_INSN_BCCGRIMM8, XSTORMY16_INSN_BCCIMM16, XSTORMY16_INSN_BNGRIMM4
|
64 |
|
|
, XSTORMY16_INSN_BNGRGR, XSTORMY16_INSN_BNLMEMIMM, XSTORMY16_INSN_BNHMEMIMM, XSTORMY16_INSN_BPGRIMM4
|
65 |
|
|
, XSTORMY16_INSN_BPGRGR, XSTORMY16_INSN_BPLMEMIMM, XSTORMY16_INSN_BPHMEMIMM, XSTORMY16_INSN_BCC
|
66 |
|
|
, XSTORMY16_INSN_BGR, XSTORMY16_INSN_BR, XSTORMY16_INSN_JMP, XSTORMY16_INSN_JMPF
|
67 |
|
|
, XSTORMY16_INSN_CALLRGR, XSTORMY16_INSN_CALLRIMM, XSTORMY16_INSN_CALLGR, XSTORMY16_INSN_CALLFIMM
|
68 |
|
|
, XSTORMY16_INSN_ICALLRGR, XSTORMY16_INSN_ICALLGR, XSTORMY16_INSN_ICALLFIMM, XSTORMY16_INSN_IRET
|
69 |
|
|
, XSTORMY16_INSN_RET, XSTORMY16_INSN_MUL, XSTORMY16_INSN_DIV, XSTORMY16_INSN_SDIV
|
70 |
|
|
, XSTORMY16_INSN_SDIVLH, XSTORMY16_INSN_DIVLH, XSTORMY16_INSN_RESET, XSTORMY16_INSN_NOP
|
71 |
|
|
, XSTORMY16_INSN_HALT, XSTORMY16_INSN_HOLD, XSTORMY16_INSN_HOLDX, XSTORMY16_INSN_BRK
|
72 |
|
|
, XSTORMY16_INSN_SYSCALL
|
73 |
|
|
} CGEN_INSN_TYPE;
|
74 |
|
|
|
75 |
|
|
/* Index of `invalid' insn place holder. */
|
76 |
|
|
#define CGEN_INSN_INVALID XSTORMY16_INSN_INVALID
|
77 |
|
|
|
78 |
|
|
/* Total number of insns in table. */
|
79 |
|
|
#define MAX_INSNS ((int) XSTORMY16_INSN_SYSCALL + 1)
|
80 |
|
|
|
81 |
|
|
/* This struct records data prior to insertion or after extraction. */
|
82 |
|
|
struct cgen_fields
|
83 |
|
|
{
|
84 |
|
|
int length;
|
85 |
|
|
long f_nil;
|
86 |
|
|
long f_anyof;
|
87 |
|
|
long f_Rd;
|
88 |
|
|
long f_Rdm;
|
89 |
|
|
long f_Rm;
|
90 |
|
|
long f_Rs;
|
91 |
|
|
long f_Rb;
|
92 |
|
|
long f_Rbj;
|
93 |
|
|
long f_op1;
|
94 |
|
|
long f_op2;
|
95 |
|
|
long f_op2a;
|
96 |
|
|
long f_op2m;
|
97 |
|
|
long f_op3;
|
98 |
|
|
long f_op3a;
|
99 |
|
|
long f_op3b;
|
100 |
|
|
long f_op4;
|
101 |
|
|
long f_op4m;
|
102 |
|
|
long f_op4b;
|
103 |
|
|
long f_op5;
|
104 |
|
|
long f_op5a;
|
105 |
|
|
long f_op;
|
106 |
|
|
long f_imm2;
|
107 |
|
|
long f_imm3;
|
108 |
|
|
long f_imm3b;
|
109 |
|
|
long f_imm4;
|
110 |
|
|
long f_imm8;
|
111 |
|
|
long f_imm12;
|
112 |
|
|
long f_imm16;
|
113 |
|
|
long f_lmem8;
|
114 |
|
|
long f_hmem8;
|
115 |
|
|
long f_rel8_2;
|
116 |
|
|
long f_rel8_4;
|
117 |
|
|
long f_rel12;
|
118 |
|
|
long f_rel12a;
|
119 |
|
|
long f_abs24_1;
|
120 |
|
|
long f_abs24_2;
|
121 |
|
|
long f_abs24;
|
122 |
|
|
};
|
123 |
|
|
|
124 |
|
|
#define CGEN_INIT_PARSE(od) \
|
125 |
|
|
{\
|
126 |
|
|
}
|
127 |
|
|
#define CGEN_INIT_INSERT(od) \
|
128 |
|
|
{\
|
129 |
|
|
}
|
130 |
|
|
#define CGEN_INIT_EXTRACT(od) \
|
131 |
|
|
{\
|
132 |
|
|
}
|
133 |
|
|
#define CGEN_INIT_PRINT(od) \
|
134 |
|
|
{\
|
135 |
|
|
}
|
136 |
|
|
|
137 |
|
|
|
138 |
|
|
#endif /* XSTORMY16_OPC_H */
|