1abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes/****************************************************************************
2abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ****************************************************************************
3abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***
4abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   This header was automatically generated from a Linux kernel header
5abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   of the same name, to make information necessary for userspace to
6abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   call into the kernel available to libc.  It contains only constants,
7abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   structures, and macros generated from the original header, and thus,
8abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   contains no copyrightable information.
9abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***
10abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   To edit the content of this header, modify the corresponding
11abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   source file (e.g. under external/kernel-headers/original/) then
12abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   run bionic/libc/kernel/tools/update_all.py
13abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***
14abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   Any manual change here will be lost the next time this script will
15abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***   be run. You've been warned!
16abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ***
17abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ****************************************************************************
18abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ****************************************************************************/
19abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#ifndef _UAPI_ASM_INST_H
20abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define _UAPI_ASM_INST_H
21ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#include <asm/bitfield.h>
22abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughesenum major_op {
23d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec_op,
24d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bcond_op,
25d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  j_op,
26d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  jal_op,
27d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  beq_op,
28d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bne_op,
29d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  blez_op,
30d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bgtz_op,
31d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  addi_op,
3249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  pop10_op = addi_op,
33d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  addiu_op,
34d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  slti_op,
3505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  sltiu_op,
36d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  andi_op,
37d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ori_op,
38d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  xori_op,
3905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  lui_op,
40d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  cop0_op,
41d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  cop1_op,
42d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  cop2_op,
4305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  cop1x_op,
44d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  beql_op,
45d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bnel_op,
46d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  blezl_op,
4705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  bgtzl_op,
48d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  daddi_op,
4949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  pop30_op = daddi_op,
50d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  daddiu_op,
51d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ldl_op,
52d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ldr_op,
53d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec2_op,
54d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  jalx_op,
55d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mdmx_op,
5605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  msa_op = mdmx_op,
57d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec3_op,
58d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lb_op,
59d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lh_op,
60d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwl_op,
61d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lw_op,
62d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lbu_op,
63d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lhu_op,
64d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwr_op,
65d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwu_op,
66d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sb_op,
67d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sh_op,
68d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  swl_op,
69d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sw_op,
70d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sdl_op,
71d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sdr_op,
72d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  swr_op,
73d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  cache_op,
74d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ll_op,
75d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwc1_op,
76d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwc2_op,
7705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  bc6_op = lwc2_op,
78d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  pref_op,
79d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lld_op,
80d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ldc1_op,
81d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ldc2_op,
8249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  pop66_op = ldc2_op,
8305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  ld_op,
84d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sc_op,
85d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  swc1_op,
86d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  swc2_op,
8705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  balc6_op = swc2_op,
8805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  major_3b_op,
89d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  scd_op,
90d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sdc1_op,
91d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sdc2_op,
9249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  pop76_op = sdc2_op,
93d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sd_op
94ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris};
95abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughesenum spec_op {
96d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sll_op,
97d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  movc_op,
98d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  srl_op,
99d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sra_op,
100d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sllv_op,
101d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  pmon_op,
102d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  srlv_op,
103d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  srav_op,
104d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  jr_op,
105d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  jalr_op,
106d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  movz_op,
107d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  movn_op,
108d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  syscall_op,
109d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  break_op,
110d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spim_op,
111d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sync_op,
112d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mfhi_op,
113d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mthi_op,
114d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mflo_op,
115d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mtlo_op,
116d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsllv_op,
117d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec2_unused_op,
118d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsrlv_op,
119d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsrav_op,
120d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mult_op,
121d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  multu_op,
122d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  div_op,
123d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  divu_op,
124d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dmult_op,
125d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dmultu_op,
126d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ddiv_op,
127d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ddivu_op,
128d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  add_op,
129d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  addu_op,
130d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sub_op,
131d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  subu_op,
132d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  and_op,
133d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  or_op,
134d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  xor_op,
135d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  nor_op,
136d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec3_unused_op,
137d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec4_unused_op,
138d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  slt_op,
139d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sltu_op,
140d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dadd_op,
141d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  daddu_op,
142d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsub_op,
143d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsubu_op,
144d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tge_op,
145d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tgeu_op,
146d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tlt_op,
147d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tltu_op,
148d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  teq_op,
149d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec5_unused_op,
150d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tne_op,
151d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec6_unused_op,
152d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsll_op,
153d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec7_unused_op,
154d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsrl_op,
155d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsra_op,
156d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsll32_op,
157d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec8_unused_op,
158d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsrl32_op,
159d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dsra32_op
160d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao};
161d7db594b8d1dab36b711bd887a9dd21675c87243Tao Baoenum spec2_op {
162d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  madd_op,
163d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  maddu_op,
164d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mul_op,
165d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spec2_3_unused_op,
166d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  msub_op,
167d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  msubu_op,
168d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  clz_op = 0x20,
169d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  clo_op,
170d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dclz_op = 0x24,
171d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dclo_op,
172d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sdbpp_op = 0x3f
173d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao};
174d7db594b8d1dab36b711bd887a9dd21675c87243Tao Baoenum spec3_op {
175d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ext_op,
176d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dextm_op,
177d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dextu_op,
178d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dext_op,
179d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ins_op,
180d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dinsm_op,
181d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dinsu_op,
182d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dins_op,
183d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  yield_op = 0x09,
184d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lx_op = 0x0a,
185d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwle_op = 0x19,
186d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwre_op = 0x1a,
187d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  cachee_op = 0x1b,
188d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sbe_op = 0x1c,
189d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  she_op = 0x1d,
190d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sce_op = 0x1e,
191d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  swe_op = 0x1f,
192d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bshfl_op = 0x20,
193d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  swle_op = 0x21,
194d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  swre_op = 0x22,
195d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  prefe_op = 0x23,
196d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dbshfl_op = 0x24,
19705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  cache6_op = 0x25,
19805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  sc6_op = 0x26,
19905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  scd6_op = 0x27,
20005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  lbue_op = 0x28,
201d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lhue_op = 0x29,
202d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lbe_op = 0x2c,
203d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lhe_op = 0x2d,
204d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lle_op = 0x2e,
205d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwe_op = 0x2f,
20605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  pref6_op = 0x35,
20705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  ll6_op = 0x36,
20805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  lld6_op = 0x37,
209d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rdhwr_op = 0x3b
210abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes};
21149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum mult_op {
21249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mult_mult_op = 0x0,
21349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mult_mul_op = 0x2,
21449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mult_muh_op = 0x3,
21549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
21649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum multu_op {
21749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  multu_multu_op = 0x0,
21849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  multu_mulu_op = 0x2,
21949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  multu_muhu_op = 0x3,
22049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
22149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum div_op {
22249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  div_div_op = 0x0,
22349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  div_div6_op = 0x2,
22449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  div_mod_op = 0x3,
22549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
22649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum divu_op {
22749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  divu_divu_op = 0x0,
22849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  divu_divu6_op = 0x2,
22949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  divu_modu_op = 0x3,
23049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
23149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum dmult_op {
23249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  dmult_dmult_op = 0x0,
23349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  dmult_dmul_op = 0x2,
23449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  dmult_dmuh_op = 0x3,
23549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
23649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum dmultu_op {
23749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  dmultu_dmultu_op = 0x0,
23849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  dmultu_dmulu_op = 0x2,
23949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  dmultu_dmuhu_op = 0x3,
24049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
24149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum ddiv_op {
24249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  ddiv_ddiv_op = 0x0,
24349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  ddiv_ddiv6_op = 0x2,
24449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  ddiv_dmod_op = 0x3,
24549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
24649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum ddivu_op {
24749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  ddivu_ddivu_op = 0x0,
24849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  ddivu_ddivu6_op = 0x2,
24949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  ddivu_dmodu_op = 0x3,
25049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
25105d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum rt_op {
252d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bltz_op,
253d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bgez_op,
254d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bltzl_op,
25505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  bgezl_op,
256d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  spimi_op,
257d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unused_rt_op_0x05,
258d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unused_rt_op_0x06,
25905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  unused_rt_op_0x07,
260d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tgei_op,
261d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tgeiu_op,
262d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tlti_op,
26305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  tltiu_op,
264d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  teqi_op,
265d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unused_0x0d_rt_op,
266d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tnei_op,
26705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  unused_0x0f_rt_op,
268d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bltzal_op,
269d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bgezal_op,
270d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bltzall_op,
27105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  bgezall_op,
272d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rt_op_0x14,
273d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rt_op_0x15,
274d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rt_op_0x16,
27505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  rt_op_0x17,
276d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rt_op_0x18,
277d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rt_op_0x19,
278d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rt_op_0x1a,
27905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  rt_op_0x1b,
280d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bposge32_op,
281d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rt_op_0x1d,
282d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rt_op_0x1e,
28349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  synci_op
284abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes};
285abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughesenum cop_op {
286d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mfc_op = 0x00,
28705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  dmfc_op = 0x01,
288d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  cfc_op = 0x02,
28905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mfhc0_op = 0x02,
290d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mfhc_op = 0x03,
291d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mtc_op = 0x04,
292d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dmtc_op = 0x05,
293d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ctc_op = 0x06,
29405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mthc0_op = 0x06,
295d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mthc_op = 0x07,
296d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bc_op = 0x08,
29705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  bc1eqz_op = 0x09,
298106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mfmc0_op = 0x0b,
299106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  bc1nez_op = 0x0d,
300106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  wrpgpr_op = 0x0e,
30105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  cop_op = 0x10,
302d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  copm_op = 0x18
303abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes};
304abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughesenum bcop_op {
30505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  bcf_op,
306d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bct_op,
307d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bcfl_op,
308d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  bctl_op
30905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
310abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughesenum cop0_coi_func {
311d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tlbr_op = 0x01,
312d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tlbwi_op = 0x02,
31305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  tlbwr_op = 0x06,
314d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tlbp_op = 0x08,
315d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  rfe_op = 0x10,
316d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  eret_op = 0x18,
31705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  wait_op = 0x20,
318525ce914edf136d2bd02ac8c404d56c52e737f4dChristopher Ferris  hypcall_op = 0x28
319d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao};
320ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferrisenum cop0_com_func {
321d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tlbr1_op = 0x01,
32205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  tlbw_op = 0x02,
323d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  tlbp1_op = 0x08,
324d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dctr_op = 0x09,
325d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  dctw_op = 0x0a
32605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
32738062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisenum cop1_fmt {
328d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  s_fmt,
329d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  d_fmt,
33005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  e_fmt,
331d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  q_fmt,
332d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  w_fmt,
333d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  l_fmt
33405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
33538062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisenum cop1_sdw_func {
336d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fadd_op = 0x00,
337d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fsub_op = 0x01,
33805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fmul_op = 0x02,
339d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fdiv_op = 0x03,
340d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fsqrt_op = 0x04,
341d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fabs_op = 0x05,
34205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fmov_op = 0x06,
343d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fneg_op = 0x07,
344d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  froundl_op = 0x08,
345d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ftruncl_op = 0x09,
34605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fceill_op = 0x0a,
347d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ffloorl_op = 0x0b,
348d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fround_op = 0x0c,
349d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ftrunc_op = 0x0d,
35005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fceil_op = 0x0e,
351d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ffloor_op = 0x0f,
352106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  fsel_op = 0x10,
353d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fmovc_op = 0x11,
354d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fmovz_op = 0x12,
35505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fmovn_op = 0x13,
35605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fseleqz_op = 0x14,
357d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  frecip_op = 0x15,
358d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  frsqrt_op = 0x16,
35905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fselnez_op = 0x17,
36005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fmaddf_op = 0x18,
36105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fmsubf_op = 0x19,
36205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  frint_op = 0x1a,
36305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fclass_op = 0x1b,
36405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fmin_op = 0x1c,
36505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fmina_op = 0x1d,
36605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fmax_op = 0x1e,
36705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  fmaxa_op = 0x1f,
368d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fcvts_op = 0x20,
369d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fcvtd_op = 0x21,
370d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fcvte_op = 0x22,
371d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fcvtw_op = 0x24,
372d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fcvtl_op = 0x25,
373d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  fcmp_op = 0x30
374ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris};
37538062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisenum cop1x_func {
376d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwxc1_op = 0x00,
377d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ldxc1_op = 0x01,
378d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  swxc1_op = 0x08,
379d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sdxc1_op = 0x09,
380d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  pfetch_op = 0x0f,
381d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  madd_s_op = 0x20,
382d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  madd_d_op = 0x21,
383d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  madd_e_op = 0x22,
384d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  msub_s_op = 0x28,
385d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  msub_d_op = 0x29,
386d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  msub_e_op = 0x2a,
387d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  nmadd_s_op = 0x30,
388d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  nmadd_d_op = 0x31,
389d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  nmadd_e_op = 0x32,
390d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  nmsub_s_op = 0x38,
391d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  nmsub_d_op = 0x39,
392d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  nmsub_e_op = 0x3a
393abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes};
394ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferrisenum mad_func {
395d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  madd_fp_op = 0x08,
396d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  msub_fp_op = 0x0a,
397d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  nmadd_fp_op = 0x0c,
398d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  nmsub_fp_op = 0x0e
399106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
400106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisenum ptw_func {
401106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  lwdir_op = 0x00,
402106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  lwpte_op = 0x01,
403106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  lddir_op = 0x02,
404106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  ldpte_op = 0x03,
405d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao};
406ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferrisenum lx_func {
407d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwx_op = 0x00,
408106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  lhx_op = 0x04,
409d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lbux_op = 0x06,
410d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  ldx_op = 0x08,
411d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lwux_op = 0x10,
412106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  lhux_op = 0x14,
413d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  lbx_op = 0x16,
414abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes};
415ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferrisenum bshfl_func {
416106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  wsbh_op = 0x2,
417d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  seb_op = 0x10,
418d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  seh_op = 0x18,
419106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
4201308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferrisenum dbshfl_func {
4211308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  dsbh_op = 0x2,
4221308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  dshd_op = 0x5,
4231308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris};
42449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum msa_func {
42549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  msa_elm_op = 0x19,
42649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
42749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum msa_elm {
42849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  msa_ctc_op = 0x3e,
42949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  msa_cfc_op = 0x7e,
43049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
43105d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum msa_mi10_func {
43205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  msa_ld_op = 8,
43305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  msa_st_op = 9,
434106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
43505d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum msa_2b_fmt {
43605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  msa_fmt_b = 0,
43705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  msa_fmt_h = 1,
438106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  msa_fmt_w = 2,
43905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  msa_fmt_d = 3,
440ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris};
44138062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisenum mm_major_op {
442106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_pool32a_op,
44305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_pool16a_op,
444d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lbu16_op,
445d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_move16_op,
446106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_addi32_op,
44705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_lbu32_op,
448d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sb32_op,
449d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lb32_op,
450106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_pool32b_op,
45105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_pool16b_op,
452d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lhu16_op,
453d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_andi16_op,
454106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_addiu32_op,
45505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_lhu32_op,
456d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sh32_op,
457d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lh32_op,
458106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_pool32i_op,
45905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_pool16c_op,
460d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lwsp16_op,
461d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_pool16d_op,
462106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_ori32_op,
46305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_pool32f_op,
46449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mm_pool32s_op,
465d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_reserved2_op,
466106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_pool32c_op,
46705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_lwgp16_op,
468d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lw16_op,
469d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_pool16e_op,
470106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_xori32_op,
47105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_jals32_op,
472d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_addiupc_op,
473d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_reserved3_op,
474106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_reserved4_op,
47505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_pool16f_op,
476d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sb16_op,
477d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_beqz16_op,
478106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_slti32_op,
47905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_beq32_op,
480d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_swc132_op,
481d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lwc132_op,
482106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_reserved5_op,
48305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_reserved6_op,
484d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sh16_op,
485d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bnez16_op,
486106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_sltiu32_op,
48705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_bne32_op,
488d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sdc132_op,
489d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_ldc132_op,
490106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_reserved7_op,
49105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_reserved8_op,
492d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_swsp16_op,
493d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_b16_op,
494106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_andi32_op,
49505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_j32_op,
496d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sd32_op,
497d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_ld32_op,
498106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_reserved11_op,
49905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_reserved12_op,
500d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sw16_op,
501d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_li16_op,
502106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_jalx32_op,
50305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_jal32_op,
504d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sw32_op,
505d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lw32_op,
506106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
50705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum mm_32i_minor_op {
508d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bltz_op,
509d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bltzal_op,
510106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_bgez_op,
51105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_bgezal_op,
512d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_blez_op,
513d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bnezc_op,
514106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_bgtz_op,
51505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_beqzc_op,
516d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_tlti_op,
517d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_tgei_op,
518106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_tltiu_op,
51905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_tgeiu_op,
520d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_tnei_op,
521d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lui_op,
522106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_teqi_op,
52305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_reserved13_op,
524d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_synci_op,
525d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bltzals_op,
526106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_reserved14_op,
52705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_bgezals_op,
528d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bc2f_op,
529d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bc2t_op,
530106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_reserved15_op,
53105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_reserved16_op,
532d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_reserved17_op,
533d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_reserved18_op,
534106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_bposge64_op,
53505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_bposge32_op,
536d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bc1f_op,
537d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bc1t_op,
538106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_reserved19_op,
53905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_reserved20_op,
540d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bc1any2f_op,
541d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_bc1any2t_op,
542106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_bc1any4f_op,
54305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_bc1any4t_op,
544d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao};
545abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughesenum mm_32a_minor_op {
546106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_sll32_op = 0x000,
54705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_ins_op = 0x00c,
548d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sllv32_op = 0x010,
549d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_ext_op = 0x02c,
550106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_pool32axf_op = 0x03c,
55105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_srl32_op = 0x040,
552d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sra_op = 0x080,
553d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_srlv32_op = 0x090,
554106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_rotr_op = 0x0c0,
55505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_lwxs_op = 0x118,
556d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_addu32_op = 0x150,
557d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_subu32_op = 0x1d0,
558106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_wsbh_op = 0x1ec,
55905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_mul_op = 0x210,
560d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_and_op = 0x250,
561d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_or32_op = 0x290,
562106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_xor32_op = 0x310,
56305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_slt_op = 0x350,
564d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sltu_op = 0x390,
565ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris};
566106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisenum mm_32b_func {
56705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_lwc2_func = 0x0,
568d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lwp_func = 0x1,
569d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_ldc2_func = 0x2,
570106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_ldp_func = 0x4,
57105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_lwm32_func = 0x5,
572d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_cache_func = 0x6,
573d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_ldm_func = 0x7,
574106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_swc2_func = 0x8,
57505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_swp_func = 0x9,
576d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sdc2_func = 0xa,
577d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sdp_func = 0xc,
578106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_swm32_func = 0xd,
57905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_sdm_func = 0xf,
580d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao};
581ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferrisenum mm_32c_func {
582106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_pref_func = 0x2,
58305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_ll_func = 0x3,
584d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_swr_func = 0x9,
585d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sc_func = 0xb,
586106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_lwu_func = 0xe,
58705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
588d7db594b8d1dab36b711bd887a9dd21675c87243Tao Baoenum mm_32axf_minor_op {
589d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_mfc0_op = 0x003,
590106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_mtc0_op = 0x00b,
59105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_tlbp_op = 0x00d,
592d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_mfhi32_op = 0x035,
593d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_jalr_op = 0x03c,
594106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_tlbr_op = 0x04d,
59505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_mflo32_op = 0x075,
596d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_jalrhb_op = 0x07c,
597d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_tlbwi_op = 0x08d,
59849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mm_mthi32_op = 0x0b5,
599106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_tlbwr_op = 0x0cd,
60049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mm_mtlo32_op = 0x0f5,
60149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mm_di_op = 0x11d,
60205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_jalrs_op = 0x13c,
603d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_jalrshb_op = 0x17c,
604d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_sync_op = 0x1ad,
605106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_syscall_op = 0x22d,
60605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_wait_op = 0x24d,
607d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_eret_op = 0x3cd,
608d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_divu_op = 0x5dc,
609106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
61005d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum mm_32f_minor_op {
611d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_00_op = 0x00,
612d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_01_op = 0x01,
613106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_32f_02_op = 0x02,
61405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_32f_10_op = 0x08,
615d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_11_op = 0x09,
616d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_12_op = 0x0a,
617106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_32f_20_op = 0x10,
61805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_32f_30_op = 0x18,
619d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_40_op = 0x20,
620d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_41_op = 0x21,
621106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_32f_42_op = 0x22,
62205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_32f_50_op = 0x28,
623d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_51_op = 0x29,
624d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_52_op = 0x2a,
625106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_32f_60_op = 0x30,
62605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_32f_70_op = 0x38,
627d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_73_op = 0x3b,
628d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_32f_74_op = 0x3c,
629106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
63005d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum mm_32f_10_minor_op {
631d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lwxc1_op = 0x1,
632d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_swxc1_op,
633106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_ldxc1_op,
63405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_sdxc1_op,
635d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_luxc1_op,
636d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_suxc1_op,
637106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
63805d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum mm_32f_func {
639d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_lwxc1_func = 0x048,
640d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_swxc1_func = 0x088,
641106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_ldxc1_func = 0x0c8,
64205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_sdxc1_func = 0x108,
643abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes};
644d7db594b8d1dab36b711bd887a9dd21675c87243Tao Baoenum mm_32f_40_minor_op {
645106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_fmovf_op,
64605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_fmovt_op,
647d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao};
648abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughesenum mm_32f_60_minor_op {
649106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_fadd_op,
65005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_fsub_op,
651d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fmul_op,
652d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fdiv_op,
653106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
65405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum mm_32f_70_minor_op {
655d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fmovn_op,
656d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fmovz_op,
657106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
65805d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum mm_32f_73_minor_op {
659d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fmov0_op = 0x01,
660d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fcvtl_op = 0x04,
661106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_movf0_op = 0x05,
66205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_frsqrt_op = 0x08,
663d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_ffloorl_op = 0x0c,
664d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fabs0_op = 0x0d,
665106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_fcvtw_op = 0x24,
66605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_movt0_op = 0x25,
667d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fsqrt_op = 0x28,
668d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_ffloorw_op = 0x2c,
669106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_fneg0_op = 0x2d,
67005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_cfc1_op = 0x40,
671d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_frecip_op = 0x48,
672d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fceill_op = 0x4c,
673106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_fcvtd0_op = 0x4d,
67405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_ctc1_op = 0x60,
675d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fceilw_op = 0x6c,
676d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fcvts0_op = 0x6d,
677106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_mfc1_op = 0x80,
67805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_fmov1_op = 0x81,
679d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_movf1_op = 0x85,
680d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_ftruncl_op = 0x8c,
681106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_fabs1_op = 0x8d,
68205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_mtc1_op = 0xa0,
683d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_movt1_op = 0xa5,
684d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_ftruncw_op = 0xac,
685106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_fneg1_op = 0xad,
68605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_mfhc1_op = 0xc0,
687d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_froundl_op = 0xcc,
688d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fcvtd1_op = 0xcd,
689106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_mthc1_op = 0xe0,
69005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_froundw_op = 0xec,
691d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_fcvts1_op = 0xed,
692abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes};
69349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisenum mm_32s_minor_op {
69449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mm_32s_elm_op = 0x16,
69549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
696106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisenum mm_16c_minor_op {
69705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_lwm16_op = 0x04,
698d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_swm16_op = 0x05,
69949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mm_jr16_op = 0x0c,
700106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  mm_jrc_op = 0x0d,
70105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  mm_jalr16_op = 0x0e,
702d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_jalrs16_op = 0x0f,
70349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mm_jraddiusp_op = 0x18,
704106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
70505d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum mm_16d_minor_op {
706d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  mm_addius5_func,
70749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  mm_addiusp_func,
708106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
70905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum MIPS16e_ops {
710d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  MIPS16e_jal_op = 003,
71149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  MIPS16e_ld_op = 007,
712106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  MIPS16e_i8_op = 014,
71305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  MIPS16e_sd_op = 017,
714d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  MIPS16e_lb_op = 020,
71549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  MIPS16e_lh_op = 021,
716106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  MIPS16e_lwsp_op = 022,
71705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  MIPS16e_lw_op = 023,
718d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  MIPS16e_lbu_op = 024,
71949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  MIPS16e_lhu_op = 025,
720106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  MIPS16e_lwpc_op = 026,
72105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  MIPS16e_lwu_op = 027,
722d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  MIPS16e_sb_op = 030,
72349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  MIPS16e_sh_op = 031,
724106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  MIPS16e_swsp_op = 032,
72505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  MIPS16e_sw_op = 033,
726d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  MIPS16e_rr_op = 035,
72749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  MIPS16e_extend_op = 036,
728106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  MIPS16e_i64_op = 037,
72905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
730d7db594b8d1dab36b711bd887a9dd21675c87243Tao Baoenum MIPS16e_i64_func {
73149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  MIPS16e_ldsp_func,
732106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  MIPS16e_sdsp_func,
73305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  MIPS16e_sdrasp_func,
734d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  MIPS16e_dadjsp_func,
73549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  MIPS16e_ldpc_func,
736106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris};
73705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum MIPS16e_rr_func {
738d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  MIPS16e_jr_func,
73949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
740106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisenum MIPS6e_i8_func {
74105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  MIPS16e_swrasp_func = 02,
742d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao};
74349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris#define MM_NOP16 0x0c00
744106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct j_format {
74505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int target : 26,;
746d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))
74749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
748106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct i_format {
74905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(signed int simmediate : 16,;
750d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))
75149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
752106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct u_format {
75305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int uimmediate : 16,;
754d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))
75549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
756106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct c_format {
75705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int c_op : 3, __BITFIELD_FIELD(unsigned int cache : 2, __BITFIELD_FIELD(unsigned int simmediate : 16,;
758d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))
75949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
760106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct r_format {
76105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,;
762d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
763ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris};
76449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct c0r_format {
76549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int z : 8, __BITFIELD_FIELD(unsigned int sel : 3,;
76649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ))))))
76749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
76849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct mfmc0_format {
76949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int sc : 1, __BITFIELD_FIELD(unsigned int : 2, __BITFIELD_FIELD(unsigned int sel : 3,;
77049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ))))))))
77149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
77249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct co_format {
77349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int co : 1, __BITFIELD_FIELD(unsigned int code : 19, __BITFIELD_FIELD(unsigned int func : 6,;
77449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ))))
77549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
776106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct p_format {
77705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,;
778d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
77949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
780106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct f_format {
78105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int : 1, __BITFIELD_FIELD(unsigned int fmt : 4, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,;
782d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))))
78349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
784106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct ma_format {
78505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int fmt : 2,;
786d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))))
78749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
788106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct b_format {
78905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int code : 20, __BITFIELD_FIELD(unsigned int func : 6,;
790d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))
79149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
792106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct ps_format {
79305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
794d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
79549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
796106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct v_format {
79705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int sel : 4, __BITFIELD_FIELD(unsigned int fmt : 1, __BITFIELD_FIELD(unsigned int vt : 5, __BITFIELD_FIELD(unsigned int vs : 5, __BITFIELD_FIELD(unsigned int vd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
798d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))))
79949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
800106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct msa_mi10_format {
80105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(signed int s10 : 10, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int wd : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int df : 2,;
80205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ))))))
80349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
8041308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferrisstruct dsp_format {
8051308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int func : 6,;
8061308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris ))))))
8071308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris};
808106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct spec3_format {
80905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(signed int simmediate : 9, __BITFIELD_FIELD(unsigned int func : 7,;
810d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))
81149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
812106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct fb_format {
81305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int bc : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int flag : 2, __BITFIELD_FIELD(signed int simmediate : 16,;
814d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))
81549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
816106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct fp0_format {
81705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fmt : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
818d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
81949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
820106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_fp0_format {
82105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int op : 2, __BITFIELD_FIELD(unsigned int func : 6,;
822d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))))
82349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
824106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct fp1_format {
82505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
826d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
82749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
828106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_fp1_format {
82905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fmt : 2, __BITFIELD_FIELD(unsigned int op : 8, __BITFIELD_FIELD(unsigned int func : 6,;
830d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
83149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
832106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_fp2_format {
83305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int zero : 2, __BITFIELD_FIELD(unsigned int fmt : 2, __BITFIELD_FIELD(unsigned int op : 3, __BITFIELD_FIELD(unsigned int func : 6,;
834d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))))
83549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
836106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_fp3_format {
83705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int op : 7, __BITFIELD_FIELD(unsigned int func : 6,;
838d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
83949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
840106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_fp4_format {
84105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int cond : 4, __BITFIELD_FIELD(unsigned int func : 6,;
842d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))))
84349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
844106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_fp5_format {
84505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int func : 6,;
846d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
84749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
848106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct fp6_format {
84905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
850d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
85149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
852106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_fp6_format {
85305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int func : 6,;
854d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
85549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
856106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_i_format {
85705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(signed int simmediate : 16,;
858d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))
85949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
860106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_m_format {
86105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(signed int simmediate : 12,;
862d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))
86349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
864106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_x_format {
86505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int func : 11,;
866d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))
86749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
868106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_a_format {
869106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 3, __BITFIELD_FIELD(signed int simmediate : 23,;
870106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris )))
87149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
872106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_b0_format {
87305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(signed int simmediate : 10, __BITFIELD_FIELD(unsigned int : 16,;
874d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))
87549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
876106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm_b1_format {
87705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 3, __BITFIELD_FIELD(signed int simmediate : 7, __BITFIELD_FIELD(unsigned int : 16,;
878d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))
87949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
880106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm16_m_format {
88105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int rlist : 2, __BITFIELD_FIELD(unsigned int imm : 4, __BITFIELD_FIELD(unsigned int : 16,;
882d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))
88349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
884106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm16_rb_format {
88505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 3, __BITFIELD_FIELD(unsigned int base : 3, __BITFIELD_FIELD(signed int simmediate : 4, __BITFIELD_FIELD(unsigned int : 16,;
886d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))))
88749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
888106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm16_r3_format {
88905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 3, __BITFIELD_FIELD(signed int simmediate : 7, __BITFIELD_FIELD(unsigned int : 16,;
890d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))
89149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
892106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct mm16_r5_format {
8931308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int imm : 5, __BITFIELD_FIELD(unsigned int : 16,;
894d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))
89549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
896106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct m16e_rr {
89705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int nd : 1, __BITFIELD_FIELD(unsigned int l : 1, __BITFIELD_FIELD(unsigned int ra : 1, __BITFIELD_FIELD(unsigned int func : 5,;
898d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))))
89949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
900106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct m16e_jal {
90105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int x : 1, __BITFIELD_FIELD(unsigned int imm20_16 : 5, __BITFIELD_FIELD(signed int imm25_21 : 5,;
902d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))
90349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
904106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct m16e_i64 {
90505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int imm : 8,;
906d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))
90749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
908106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct m16e_ri64 {
90905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int ry : 3, __BITFIELD_FIELD(unsigned int imm : 5,;
910d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))
91149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
912106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct m16e_ri {
91305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int imm : 8,;
914d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))
91549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
916106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct m16e_rri {
91705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int ry : 3, __BITFIELD_FIELD(unsigned int imm : 5,;
918d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao ))))
91949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
920106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisstruct m16e_i8 {
92105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int imm : 8,;
922d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao )))
92349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
924106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferrisunion mips_instruction {
92505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  unsigned int word;
926d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned short halfword[2];
92749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  unsigned char byte[4];
928106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  struct j_format j_format;
92905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct i_format i_format;
930d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct u_format u_format;
93149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct c_format c_format;
932106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  struct r_format r_format;
93349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct c0r_format c0r_format;
93449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct mfmc0_format mfmc0_format;
93549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct co_format co_format;
93605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct p_format p_format;
937d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct f_format f_format;
938d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct ma_format ma_format;
939106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  struct msa_mi10_format msa_mi10_format;
940d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct b_format b_format;
941d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct ps_format ps_format;
942d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct v_format v_format;
9431308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  struct dsp_format dsp_format;
944106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  struct spec3_format spec3_format;
945d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct fb_format fb_format;
946d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct fp0_format fp0_format;
947d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_fp0_format mm_fp0_format;
948106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  struct fp1_format fp1_format;
949d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_fp1_format mm_fp1_format;
950d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_fp2_format mm_fp2_format;
951d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_fp3_format mm_fp3_format;
952106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  struct mm_fp4_format mm_fp4_format;
953d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_fp5_format mm_fp5_format;
954d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct fp6_format fp6_format;
955d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_fp6_format mm_fp6_format;
956106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  struct mm_i_format mm_i_format;
957d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_m_format mm_m_format;
958d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_x_format mm_x_format;
959106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  struct mm_a_format mm_a_format;
960d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_b0_format mm_b0_format;
961d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm_b1_format mm_b1_format;
962d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm16_m_format mm16_m_format;
963d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm16_rb_format mm16_rb_format;
964d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm16_r3_format mm16_r3_format;
965d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct mm16_r5_format mm16_r5_format;
966abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes};
967abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughesunion mips16e_instruction {
968d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int full : 16;
969d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct m16e_rr rr;
970d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct m16e_jal jal;
971d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct m16e_i64 i64;
972d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct m16e_ri64 ri64;
973d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct m16e_ri ri;
974d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct m16e_rri rri;
975d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct m16e_i8 i8;
976abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes};
977abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#endif
978