1 |
106 |
markom |
/* Instruction opcode header for fr30.
|
2 |
|
|
|
3 |
|
|
THIS FILE IS MACHINE GENERATED WITH CGEN.
|
4 |
|
|
|
5 |
|
|
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
6 |
|
|
|
7 |
|
|
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
|
8 |
|
|
|
9 |
|
|
This program 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 2, or (at your option)
|
12 |
|
|
any later version.
|
13 |
|
|
|
14 |
|
|
This program is distributed in the hope that it will be useful,
|
15 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
|
|
GNU General Public 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 |
|
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
22 |
|
|
|
23 |
|
|
*/
|
24 |
|
|
|
25 |
|
|
#ifndef FR30_OPC_H
|
26 |
|
|
#define FR30_OPC_H
|
27 |
|
|
|
28 |
|
|
/* -- opc.h */
|
29 |
|
|
|
30 |
|
|
/* ??? This can be improved upon. */
|
31 |
|
|
#undef CGEN_DIS_HASH_SIZE
|
32 |
|
|
#define CGEN_DIS_HASH_SIZE 16
|
33 |
|
|
#undef CGEN_DIS_HASH
|
34 |
|
|
#define CGEN_DIS_HASH(buffer, value) (((unsigned char *) (buffer))[0] >> 4)
|
35 |
|
|
|
36 |
|
|
/* -- */
|
37 |
|
|
/* Enum declaration for fr30 instruction types. */
|
38 |
|
|
typedef enum cgen_insn_type {
|
39 |
|
|
FR30_INSN_INVALID, FR30_INSN_ADD, FR30_INSN_ADDI, FR30_INSN_ADD2
|
40 |
|
|
, FR30_INSN_ADDC, FR30_INSN_ADDN, FR30_INSN_ADDNI, FR30_INSN_ADDN2
|
41 |
|
|
, FR30_INSN_SUB, FR30_INSN_SUBC, FR30_INSN_SUBN, FR30_INSN_CMP
|
42 |
|
|
, FR30_INSN_CMPI, FR30_INSN_CMP2, FR30_INSN_AND, FR30_INSN_OR
|
43 |
|
|
, FR30_INSN_EOR, FR30_INSN_ANDM, FR30_INSN_ANDH, FR30_INSN_ANDB
|
44 |
|
|
, FR30_INSN_ORM, FR30_INSN_ORH, FR30_INSN_ORB, FR30_INSN_EORM
|
45 |
|
|
, FR30_INSN_EORH, FR30_INSN_EORB, FR30_INSN_BANDL, FR30_INSN_BORL
|
46 |
|
|
, FR30_INSN_BEORL, FR30_INSN_BANDH, FR30_INSN_BORH, FR30_INSN_BEORH
|
47 |
|
|
, FR30_INSN_BTSTL, FR30_INSN_BTSTH, FR30_INSN_MUL, FR30_INSN_MULU
|
48 |
|
|
, FR30_INSN_MULH, FR30_INSN_MULUH, FR30_INSN_DIV0S, FR30_INSN_DIV0U
|
49 |
|
|
, FR30_INSN_DIV1, FR30_INSN_DIV2, FR30_INSN_DIV3, FR30_INSN_DIV4S
|
50 |
|
|
, FR30_INSN_LSL, FR30_INSN_LSLI, FR30_INSN_LSL2, FR30_INSN_LSR
|
51 |
|
|
, FR30_INSN_LSRI, FR30_INSN_LSR2, FR30_INSN_ASR, FR30_INSN_ASRI
|
52 |
|
|
, FR30_INSN_ASR2, FR30_INSN_LDI8, FR30_INSN_LDI20, FR30_INSN_LDI32
|
53 |
|
|
, FR30_INSN_LD, FR30_INSN_LDUH, FR30_INSN_LDUB, FR30_INSN_LDR13
|
54 |
|
|
, FR30_INSN_LDR13UH, FR30_INSN_LDR13UB, FR30_INSN_LDR14, FR30_INSN_LDR14UH
|
55 |
|
|
, FR30_INSN_LDR14UB, FR30_INSN_LDR15, FR30_INSN_LDR15GR, FR30_INSN_LDR15DR
|
56 |
|
|
, FR30_INSN_LDR15PS, FR30_INSN_ST, FR30_INSN_STH, FR30_INSN_STB
|
57 |
|
|
, FR30_INSN_STR13, FR30_INSN_STR13H, FR30_INSN_STR13B, FR30_INSN_STR14
|
58 |
|
|
, FR30_INSN_STR14H, FR30_INSN_STR14B, FR30_INSN_STR15, FR30_INSN_STR15GR
|
59 |
|
|
, FR30_INSN_STR15DR, FR30_INSN_STR15PS, FR30_INSN_MOV, FR30_INSN_MOVDR
|
60 |
|
|
, FR30_INSN_MOVPS, FR30_INSN_MOV2DR, FR30_INSN_MOV2PS, FR30_INSN_JMP
|
61 |
|
|
, FR30_INSN_JMPD, FR30_INSN_CALLR, FR30_INSN_CALLRD, FR30_INSN_CALL
|
62 |
|
|
, FR30_INSN_CALLD, FR30_INSN_RET, FR30_INSN_RET_D, FR30_INSN_INT
|
63 |
|
|
, FR30_INSN_INTE, FR30_INSN_RETI, FR30_INSN_BRAD, FR30_INSN_BRA
|
64 |
|
|
, FR30_INSN_BNOD, FR30_INSN_BNO, FR30_INSN_BEQD, FR30_INSN_BEQ
|
65 |
|
|
, FR30_INSN_BNED, FR30_INSN_BNE, FR30_INSN_BCD, FR30_INSN_BC
|
66 |
|
|
, FR30_INSN_BNCD, FR30_INSN_BNC, FR30_INSN_BND, FR30_INSN_BN
|
67 |
|
|
, FR30_INSN_BPD, FR30_INSN_BP, FR30_INSN_BVD, FR30_INSN_BV
|
68 |
|
|
, FR30_INSN_BNVD, FR30_INSN_BNV, FR30_INSN_BLTD, FR30_INSN_BLT
|
69 |
|
|
, FR30_INSN_BGED, FR30_INSN_BGE, FR30_INSN_BLED, FR30_INSN_BLE
|
70 |
|
|
, FR30_INSN_BGTD, FR30_INSN_BGT, FR30_INSN_BLSD, FR30_INSN_BLS
|
71 |
|
|
, FR30_INSN_BHID, FR30_INSN_BHI, FR30_INSN_DMOVR13, FR30_INSN_DMOVR13H
|
72 |
|
|
, FR30_INSN_DMOVR13B, FR30_INSN_DMOVR13PI, FR30_INSN_DMOVR13PIH, FR30_INSN_DMOVR13PIB
|
73 |
|
|
, FR30_INSN_DMOVR15PI, FR30_INSN_DMOV2R13, FR30_INSN_DMOV2R13H, FR30_INSN_DMOV2R13B
|
74 |
|
|
, FR30_INSN_DMOV2R13PI, FR30_INSN_DMOV2R13PIH, FR30_INSN_DMOV2R13PIB, FR30_INSN_DMOV2R15PD
|
75 |
|
|
, FR30_INSN_LDRES, FR30_INSN_STRES, FR30_INSN_COPOP, FR30_INSN_COPLD
|
76 |
|
|
, FR30_INSN_COPST, FR30_INSN_COPSV, FR30_INSN_NOP, FR30_INSN_ANDCCR
|
77 |
|
|
, FR30_INSN_ORCCR, FR30_INSN_STILM, FR30_INSN_ADDSP, FR30_INSN_EXTSB
|
78 |
|
|
, FR30_INSN_EXTUB, FR30_INSN_EXTSH, FR30_INSN_EXTUH, FR30_INSN_LDM0
|
79 |
|
|
, FR30_INSN_LDM1, FR30_INSN_STM0, FR30_INSN_STM1, FR30_INSN_ENTER
|
80 |
|
|
, FR30_INSN_LEAVE, FR30_INSN_XCHB, FR30_INSN_MAX
|
81 |
|
|
} CGEN_INSN_TYPE;
|
82 |
|
|
|
83 |
|
|
/* Index of `invalid' insn place holder. */
|
84 |
|
|
#define CGEN_INSN_INVALID FR30_INSN_INVALID
|
85 |
|
|
|
86 |
|
|
/* Total number of insns in table. */
|
87 |
|
|
#define MAX_INSNS ((int) FR30_INSN_MAX)
|
88 |
|
|
|
89 |
|
|
/* This struct records data prior to insertion or after extraction. */
|
90 |
|
|
struct cgen_fields
|
91 |
|
|
{
|
92 |
|
|
int length;
|
93 |
|
|
long f_nil;
|
94 |
|
|
long f_op1;
|
95 |
|
|
long f_op2;
|
96 |
|
|
long f_op3;
|
97 |
|
|
long f_op4;
|
98 |
|
|
long f_op5;
|
99 |
|
|
long f_cc;
|
100 |
|
|
long f_ccc;
|
101 |
|
|
long f_Rj;
|
102 |
|
|
long f_Ri;
|
103 |
|
|
long f_Rs1;
|
104 |
|
|
long f_Rs2;
|
105 |
|
|
long f_Rjc;
|
106 |
|
|
long f_Ric;
|
107 |
|
|
long f_CRj;
|
108 |
|
|
long f_CRi;
|
109 |
|
|
long f_u4;
|
110 |
|
|
long f_u4c;
|
111 |
|
|
long f_i4;
|
112 |
|
|
long f_m4;
|
113 |
|
|
long f_u8;
|
114 |
|
|
long f_i8;
|
115 |
|
|
long f_i20_4;
|
116 |
|
|
long f_i20_16;
|
117 |
|
|
long f_i20;
|
118 |
|
|
long f_i32;
|
119 |
|
|
long f_udisp6;
|
120 |
|
|
long f_disp8;
|
121 |
|
|
long f_disp9;
|
122 |
|
|
long f_disp10;
|
123 |
|
|
long f_s10;
|
124 |
|
|
long f_u10;
|
125 |
|
|
long f_rel9;
|
126 |
|
|
long f_dir8;
|
127 |
|
|
long f_dir9;
|
128 |
|
|
long f_dir10;
|
129 |
|
|
long f_rel12;
|
130 |
|
|
long f_reglist_hi_st;
|
131 |
|
|
long f_reglist_low_st;
|
132 |
|
|
long f_reglist_hi_ld;
|
133 |
|
|
long f_reglist_low_ld;
|
134 |
|
|
};
|
135 |
|
|
|
136 |
|
|
#define CGEN_INIT_PARSE(od) \
|
137 |
|
|
{\
|
138 |
|
|
}
|
139 |
|
|
#define CGEN_INIT_INSERT(od) \
|
140 |
|
|
{\
|
141 |
|
|
}
|
142 |
|
|
#define CGEN_INIT_EXTRACT(od) \
|
143 |
|
|
{\
|
144 |
|
|
}
|
145 |
|
|
#define CGEN_INIT_PRINT(od) \
|
146 |
|
|
{\
|
147 |
|
|
}
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
#endif /* FR30_OPC_H */
|