xref: /openbsd-src/gnu/usr.bin/binutils-2.17/opcodes/mt-opc.h (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smiod /* Instruction opcode header for mt.
2*3d8817e4Smiod 
3*3d8817e4Smiod THIS FILE IS MACHINE GENERATED WITH CGEN.
4*3d8817e4Smiod 
5*3d8817e4Smiod Copyright 1996-2005 Free Software Foundation, Inc.
6*3d8817e4Smiod 
7*3d8817e4Smiod This file is part of the GNU Binutils and/or GDB, the GNU debugger.
8*3d8817e4Smiod 
9*3d8817e4Smiod This program is free software; you can redistribute it and/or modify
10*3d8817e4Smiod it under the terms of the GNU General Public License as published by
11*3d8817e4Smiod the Free Software Foundation; either version 2, or (at your option)
12*3d8817e4Smiod any later version.
13*3d8817e4Smiod 
14*3d8817e4Smiod This program is distributed in the hope that it will be useful,
15*3d8817e4Smiod but WITHOUT ANY WARRANTY; without even the implied warranty of
16*3d8817e4Smiod MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17*3d8817e4Smiod GNU General Public License for more details.
18*3d8817e4Smiod 
19*3d8817e4Smiod You should have received a copy of the GNU General Public License along
20*3d8817e4Smiod with this program; if not, write to the Free Software Foundation, Inc.,
21*3d8817e4Smiod 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
22*3d8817e4Smiod 
23*3d8817e4Smiod */
24*3d8817e4Smiod 
25*3d8817e4Smiod #ifndef MT_OPC_H
26*3d8817e4Smiod #define MT_OPC_H
27*3d8817e4Smiod 
28*3d8817e4Smiod /* -- opc.h */
29*3d8817e4Smiod 
30*3d8817e4Smiod /* Check applicability of instructions against machines.  */
31*3d8817e4Smiod #define CGEN_VALIDATE_INSN_SUPPORTED
32*3d8817e4Smiod 
33*3d8817e4Smiod /* Allows reason codes to be output when assembler errors occur.  */
34*3d8817e4Smiod #define CGEN_VERBOSE_ASSEMBLER_ERRORS
35*3d8817e4Smiod 
36*3d8817e4Smiod /* Override disassembly hashing - there are variable bits in the top
37*3d8817e4Smiod    byte of these instructions.  */
38*3d8817e4Smiod #define CGEN_DIS_HASH_SIZE 8
39*3d8817e4Smiod #define CGEN_DIS_HASH(buf, value) (((* (unsigned char *) (buf)) >> 5) % CGEN_DIS_HASH_SIZE)
40*3d8817e4Smiod 
41*3d8817e4Smiod #define CGEN_ASM_HASH_SIZE 127
42*3d8817e4Smiod #define CGEN_ASM_HASH(insn) mt_asm_hash (insn)
43*3d8817e4Smiod 
44*3d8817e4Smiod extern unsigned int mt_asm_hash (const char *);
45*3d8817e4Smiod 
46*3d8817e4Smiod extern int mt_cgen_insn_supported (CGEN_CPU_DESC, const CGEN_INSN *);
47*3d8817e4Smiod 
48*3d8817e4Smiod 
49*3d8817e4Smiod /* -- opc.c */
50*3d8817e4Smiod /* Enum declaration for mt instruction types.  */
51*3d8817e4Smiod typedef enum cgen_insn_type {
52*3d8817e4Smiod   MT_INSN_INVALID, MT_INSN_ADD, MT_INSN_ADDU, MT_INSN_ADDI
53*3d8817e4Smiod  , MT_INSN_ADDUI, MT_INSN_SUB, MT_INSN_SUBU, MT_INSN_SUBI
54*3d8817e4Smiod  , MT_INSN_SUBUI, MT_INSN_MUL, MT_INSN_MULI, MT_INSN_AND
55*3d8817e4Smiod  , MT_INSN_ANDI, MT_INSN_OR, MT_INSN_NOP, MT_INSN_ORI
56*3d8817e4Smiod  , MT_INSN_XOR, MT_INSN_XORI, MT_INSN_NAND, MT_INSN_NANDI
57*3d8817e4Smiod  , MT_INSN_NOR, MT_INSN_NORI, MT_INSN_XNOR, MT_INSN_XNORI
58*3d8817e4Smiod  , MT_INSN_LDUI, MT_INSN_LSL, MT_INSN_LSLI, MT_INSN_LSR
59*3d8817e4Smiod  , MT_INSN_LSRI, MT_INSN_ASR, MT_INSN_ASRI, MT_INSN_BRLT
60*3d8817e4Smiod  , MT_INSN_BRLE, MT_INSN_BREQ, MT_INSN_BRNE, MT_INSN_JMP
61*3d8817e4Smiod  , MT_INSN_JAL, MT_INSN_DBNZ, MT_INSN_EI, MT_INSN_DI
62*3d8817e4Smiod  , MT_INSN_SI, MT_INSN_RETI, MT_INSN_LDW, MT_INSN_STW
63*3d8817e4Smiod  , MT_INSN_BREAK, MT_INSN_IFLUSH, MT_INSN_LDCTXT, MT_INSN_LDFB
64*3d8817e4Smiod  , MT_INSN_STFB, MT_INSN_FBCB, MT_INSN_MFBCB, MT_INSN_FBCCI
65*3d8817e4Smiod  , MT_INSN_FBRCI, MT_INSN_FBCRI, MT_INSN_FBRRI, MT_INSN_MFBCCI
66*3d8817e4Smiod  , MT_INSN_MFBRCI, MT_INSN_MFBCRI, MT_INSN_MFBRRI, MT_INSN_FBCBDR
67*3d8817e4Smiod  , MT_INSN_RCFBCB, MT_INSN_MRCFBCB, MT_INSN_CBCAST, MT_INSN_DUPCBCAST
68*3d8817e4Smiod  , MT_INSN_WFBI, MT_INSN_WFB, MT_INSN_RCRISC, MT_INSN_FBCBINC
69*3d8817e4Smiod  , MT_INSN_RCXMODE, MT_INSN_INTERLEAVER, MT_INSN_WFBINC, MT_INSN_MWFBINC
70*3d8817e4Smiod  , MT_INSN_WFBINCR, MT_INSN_MWFBINCR, MT_INSN_FBCBINCS, MT_INSN_MFBCBINCS
71*3d8817e4Smiod  , MT_INSN_FBCBINCRS, MT_INSN_MFBCBINCRS, MT_INSN_LOOP, MT_INSN_LOOPI
72*3d8817e4Smiod  , MT_INSN_DFBC, MT_INSN_DWFB, MT_INSN_FBWFB, MT_INSN_DFBR
73*3d8817e4Smiod } CGEN_INSN_TYPE;
74*3d8817e4Smiod 
75*3d8817e4Smiod /* Index of `invalid' insn place holder.  */
76*3d8817e4Smiod #define CGEN_INSN_INVALID MT_INSN_INVALID
77*3d8817e4Smiod 
78*3d8817e4Smiod /* Total number of insns in table.  */
79*3d8817e4Smiod #define MAX_INSNS ((int) MT_INSN_DFBR + 1)
80*3d8817e4Smiod 
81*3d8817e4Smiod /* This struct records data prior to insertion or after extraction.  */
82*3d8817e4Smiod struct cgen_fields
83*3d8817e4Smiod {
84*3d8817e4Smiod   int length;
85*3d8817e4Smiod   long f_nil;
86*3d8817e4Smiod   long f_anyof;
87*3d8817e4Smiod   long f_msys;
88*3d8817e4Smiod   long f_opc;
89*3d8817e4Smiod   long f_imm;
90*3d8817e4Smiod   long f_uu24;
91*3d8817e4Smiod   long f_sr1;
92*3d8817e4Smiod   long f_sr2;
93*3d8817e4Smiod   long f_dr;
94*3d8817e4Smiod   long f_drrr;
95*3d8817e4Smiod   long f_imm16u;
96*3d8817e4Smiod   long f_imm16s;
97*3d8817e4Smiod   long f_imm16a;
98*3d8817e4Smiod   long f_uu4a;
99*3d8817e4Smiod   long f_uu4b;
100*3d8817e4Smiod   long f_uu12;
101*3d8817e4Smiod   long f_uu8;
102*3d8817e4Smiod   long f_uu16;
103*3d8817e4Smiod   long f_uu1;
104*3d8817e4Smiod   long f_msopc;
105*3d8817e4Smiod   long f_uu_26_25;
106*3d8817e4Smiod   long f_mask;
107*3d8817e4Smiod   long f_bankaddr;
108*3d8817e4Smiod   long f_rda;
109*3d8817e4Smiod   long f_uu_2_25;
110*3d8817e4Smiod   long f_rbbc;
111*3d8817e4Smiod   long f_perm;
112*3d8817e4Smiod   long f_mode;
113*3d8817e4Smiod   long f_uu_1_24;
114*3d8817e4Smiod   long f_wr;
115*3d8817e4Smiod   long f_fbincr;
116*3d8817e4Smiod   long f_uu_2_23;
117*3d8817e4Smiod   long f_xmode;
118*3d8817e4Smiod   long f_a23;
119*3d8817e4Smiod   long f_mask1;
120*3d8817e4Smiod   long f_cr;
121*3d8817e4Smiod   long f_type;
122*3d8817e4Smiod   long f_incamt;
123*3d8817e4Smiod   long f_cbs;
124*3d8817e4Smiod   long f_uu_1_19;
125*3d8817e4Smiod   long f_ball;
126*3d8817e4Smiod   long f_colnum;
127*3d8817e4Smiod   long f_brc;
128*3d8817e4Smiod   long f_incr;
129*3d8817e4Smiod   long f_fbdisp;
130*3d8817e4Smiod   long f_uu_4_15;
131*3d8817e4Smiod   long f_length;
132*3d8817e4Smiod   long f_uu_1_15;
133*3d8817e4Smiod   long f_rc;
134*3d8817e4Smiod   long f_rcnum;
135*3d8817e4Smiod   long f_rownum;
136*3d8817e4Smiod   long f_cbx;
137*3d8817e4Smiod   long f_id;
138*3d8817e4Smiod   long f_size;
139*3d8817e4Smiod   long f_rownum1;
140*3d8817e4Smiod   long f_uu_3_11;
141*3d8817e4Smiod   long f_rc1;
142*3d8817e4Smiod   long f_ccb;
143*3d8817e4Smiod   long f_cbrb;
144*3d8817e4Smiod   long f_cdb;
145*3d8817e4Smiod   long f_rownum2;
146*3d8817e4Smiod   long f_cell;
147*3d8817e4Smiod   long f_uu_3_9;
148*3d8817e4Smiod   long f_contnum;
149*3d8817e4Smiod   long f_uu_1_6;
150*3d8817e4Smiod   long f_dup;
151*3d8817e4Smiod   long f_rc2;
152*3d8817e4Smiod   long f_ctxdisp;
153*3d8817e4Smiod   long f_imm16l;
154*3d8817e4Smiod   long f_loopo;
155*3d8817e4Smiod   long f_cb1sel;
156*3d8817e4Smiod   long f_cb2sel;
157*3d8817e4Smiod   long f_cb1incr;
158*3d8817e4Smiod   long f_cb2incr;
159*3d8817e4Smiod   long f_rc3;
160*3d8817e4Smiod   long f_msysfrsr2;
161*3d8817e4Smiod   long f_brc2;
162*3d8817e4Smiod   long f_ball2;
163*3d8817e4Smiod };
164*3d8817e4Smiod 
165*3d8817e4Smiod #define CGEN_INIT_PARSE(od) \
166*3d8817e4Smiod {\
167*3d8817e4Smiod }
168*3d8817e4Smiod #define CGEN_INIT_INSERT(od) \
169*3d8817e4Smiod {\
170*3d8817e4Smiod }
171*3d8817e4Smiod #define CGEN_INIT_EXTRACT(od) \
172*3d8817e4Smiod {\
173*3d8817e4Smiod }
174*3d8817e4Smiod #define CGEN_INIT_PRINT(od) \
175*3d8817e4Smiod {\
176*3d8817e4Smiod }
177*3d8817e4Smiod 
178*3d8817e4Smiod 
179*3d8817e4Smiod #endif /* MT_OPC_H */
180