inst.h 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085
  1. /*
  2. * Format of an instruction in memory.
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 1996, 2000 by Ralf Baechle
  9. * Copyright (C) 2006 by Thiemo Seufer
  10. * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
  11. * Copyright (C) 2014 Imagination Technologies Ltd.
  12. */
  13. #ifndef _UAPI_ASM_INST_H
  14. #define _UAPI_ASM_INST_H
  15. #include <asm/bitfield.h>
  16. /*
  17. * Major opcodes; before MIPS IV cop1x was called cop3.
  18. */
  19. enum major_op {
  20. spec_op, bcond_op, j_op, jal_op,
  21. beq_op, bne_op, blez_op, bgtz_op,
  22. addi_op, pop10_op = addi_op, addiu_op, slti_op, sltiu_op,
  23. andi_op, ori_op, xori_op, lui_op,
  24. cop0_op, cop1_op, cop2_op, cop1x_op,
  25. beql_op, bnel_op, blezl_op, bgtzl_op,
  26. daddi_op, pop30_op = daddi_op, daddiu_op, ldl_op, ldr_op,
  27. spec2_op, jalx_op, mdmx_op, msa_op = mdmx_op, spec3_op,
  28. lb_op, lh_op, lwl_op, lw_op,
  29. lbu_op, lhu_op, lwr_op, lwu_op,
  30. sb_op, sh_op, swl_op, sw_op,
  31. sdl_op, sdr_op, swr_op, cache_op,
  32. ll_op, lwc1_op, lwc2_op, bc6_op = lwc2_op, pref_op,
  33. lld_op, ldc1_op, ldc2_op, pop66_op = ldc2_op, ld_op,
  34. sc_op, swc1_op, swc2_op, balc6_op = swc2_op, major_3b_op,
  35. scd_op, sdc1_op, sdc2_op, pop76_op = sdc2_op, sd_op
  36. };
  37. /*
  38. * func field of spec opcode.
  39. */
  40. enum spec_op {
  41. sll_op, movc_op, srl_op, sra_op,
  42. sllv_op, pmon_op, srlv_op, srav_op,
  43. jr_op, jalr_op, movz_op, movn_op,
  44. syscall_op, break_op, spim_op, sync_op,
  45. mfhi_op, mthi_op, mflo_op, mtlo_op,
  46. dsllv_op, spec2_unused_op, dsrlv_op, dsrav_op,
  47. mult_op, multu_op, div_op, divu_op,
  48. dmult_op, dmultu_op, ddiv_op, ddivu_op,
  49. add_op, addu_op, sub_op, subu_op,
  50. and_op, or_op, xor_op, nor_op,
  51. spec3_unused_op, spec4_unused_op, slt_op, sltu_op,
  52. dadd_op, daddu_op, dsub_op, dsubu_op,
  53. tge_op, tgeu_op, tlt_op, tltu_op,
  54. teq_op, spec5_unused_op, tne_op, spec6_unused_op,
  55. dsll_op, spec7_unused_op, dsrl_op, dsra_op,
  56. dsll32_op, spec8_unused_op, dsrl32_op, dsra32_op
  57. };
  58. /*
  59. * func field of spec2 opcode.
  60. */
  61. enum spec2_op {
  62. madd_op, maddu_op, mul_op, spec2_3_unused_op,
  63. msub_op, msubu_op, /* more unused ops */
  64. clz_op = 0x20, clo_op,
  65. dclz_op = 0x24, dclo_op,
  66. sdbpp_op = 0x3f
  67. };
  68. /*
  69. * func field of spec3 opcode.
  70. */
  71. enum spec3_op {
  72. ext_op, dextm_op, dextu_op, dext_op,
  73. ins_op, dinsm_op, dinsu_op, dins_op,
  74. yield_op = 0x09, lx_op = 0x0a,
  75. lwle_op = 0x19, lwre_op = 0x1a,
  76. cachee_op = 0x1b, sbe_op = 0x1c,
  77. she_op = 0x1d, sce_op = 0x1e,
  78. swe_op = 0x1f, bshfl_op = 0x20,
  79. swle_op = 0x21, swre_op = 0x22,
  80. prefe_op = 0x23, dbshfl_op = 0x24,
  81. cache6_op = 0x25, sc6_op = 0x26,
  82. scd6_op = 0x27, lbue_op = 0x28,
  83. lhue_op = 0x29, lbe_op = 0x2c,
  84. lhe_op = 0x2d, lle_op = 0x2e,
  85. lwe_op = 0x2f, pref6_op = 0x35,
  86. ll6_op = 0x36, lld6_op = 0x37,
  87. rdhwr_op = 0x3b
  88. };
  89. /*
  90. * Bits 10-6 minor opcode for r6 spec mult/div encodings
  91. */
  92. enum mult_op {
  93. mult_mult_op = 0x0,
  94. mult_mul_op = 0x2,
  95. mult_muh_op = 0x3,
  96. };
  97. enum multu_op {
  98. multu_multu_op = 0x0,
  99. multu_mulu_op = 0x2,
  100. multu_muhu_op = 0x3,
  101. };
  102. enum div_op {
  103. div_div_op = 0x0,
  104. div_div6_op = 0x2,
  105. div_mod_op = 0x3,
  106. };
  107. enum divu_op {
  108. divu_divu_op = 0x0,
  109. divu_divu6_op = 0x2,
  110. divu_modu_op = 0x3,
  111. };
  112. enum dmult_op {
  113. dmult_dmult_op = 0x0,
  114. dmult_dmul_op = 0x2,
  115. dmult_dmuh_op = 0x3,
  116. };
  117. enum dmultu_op {
  118. dmultu_dmultu_op = 0x0,
  119. dmultu_dmulu_op = 0x2,
  120. dmultu_dmuhu_op = 0x3,
  121. };
  122. enum ddiv_op {
  123. ddiv_ddiv_op = 0x0,
  124. ddiv_ddiv6_op = 0x2,
  125. ddiv_dmod_op = 0x3,
  126. };
  127. enum ddivu_op {
  128. ddivu_ddivu_op = 0x0,
  129. ddivu_ddivu6_op = 0x2,
  130. ddivu_dmodu_op = 0x3,
  131. };
  132. /*
  133. * rt field of bcond opcodes.
  134. */
  135. enum rt_op {
  136. bltz_op, bgez_op, bltzl_op, bgezl_op,
  137. spimi_op, unused_rt_op_0x05, unused_rt_op_0x06, unused_rt_op_0x07,
  138. tgei_op, tgeiu_op, tlti_op, tltiu_op,
  139. teqi_op, unused_0x0d_rt_op, tnei_op, unused_0x0f_rt_op,
  140. bltzal_op, bgezal_op, bltzall_op, bgezall_op,
  141. rt_op_0x14, rt_op_0x15, rt_op_0x16, rt_op_0x17,
  142. rt_op_0x18, rt_op_0x19, rt_op_0x1a, rt_op_0x1b,
  143. bposge32_op, rt_op_0x1d, rt_op_0x1e, synci_op
  144. };
  145. /*
  146. * rs field of cop opcodes.
  147. */
  148. enum cop_op {
  149. mfc_op = 0x00, dmfc_op = 0x01,
  150. cfc_op = 0x02, mfhc0_op = 0x02,
  151. mfhc_op = 0x03, mtc_op = 0x04,
  152. dmtc_op = 0x05, ctc_op = 0x06,
  153. mthc0_op = 0x06, mthc_op = 0x07,
  154. bc_op = 0x08, bc1eqz_op = 0x09,
  155. mfmc0_op = 0x0b, bc1nez_op = 0x0d,
  156. wrpgpr_op = 0x0e, cop_op = 0x10,
  157. copm_op = 0x18
  158. };
  159. /*
  160. * rt field of cop.bc_op opcodes
  161. */
  162. enum bcop_op {
  163. bcf_op, bct_op, bcfl_op, bctl_op
  164. };
  165. /*
  166. * func field of cop0 coi opcodes.
  167. */
  168. enum cop0_coi_func {
  169. tlbr_op = 0x01, tlbwi_op = 0x02,
  170. tlbwr_op = 0x06, tlbp_op = 0x08,
  171. rfe_op = 0x10, eret_op = 0x18,
  172. wait_op = 0x20,
  173. };
  174. /*
  175. * func field of cop0 com opcodes.
  176. */
  177. enum cop0_com_func {
  178. tlbr1_op = 0x01, tlbw_op = 0x02,
  179. tlbp1_op = 0x08, dctr_op = 0x09,
  180. dctw_op = 0x0a
  181. };
  182. /*
  183. * fmt field of cop1 opcodes.
  184. */
  185. enum cop1_fmt {
  186. s_fmt, d_fmt, e_fmt, q_fmt,
  187. w_fmt, l_fmt
  188. };
  189. /*
  190. * func field of cop1 instructions using d, s or w format.
  191. */
  192. enum cop1_sdw_func {
  193. fadd_op = 0x00, fsub_op = 0x01,
  194. fmul_op = 0x02, fdiv_op = 0x03,
  195. fsqrt_op = 0x04, fabs_op = 0x05,
  196. fmov_op = 0x06, fneg_op = 0x07,
  197. froundl_op = 0x08, ftruncl_op = 0x09,
  198. fceill_op = 0x0a, ffloorl_op = 0x0b,
  199. fround_op = 0x0c, ftrunc_op = 0x0d,
  200. fceil_op = 0x0e, ffloor_op = 0x0f,
  201. fsel_op = 0x10,
  202. fmovc_op = 0x11, fmovz_op = 0x12,
  203. fmovn_op = 0x13, fseleqz_op = 0x14,
  204. frecip_op = 0x15, frsqrt_op = 0x16,
  205. fselnez_op = 0x17, fmaddf_op = 0x18,
  206. fmsubf_op = 0x19, frint_op = 0x1a,
  207. fclass_op = 0x1b, fmin_op = 0x1c,
  208. fmina_op = 0x1d, fmax_op = 0x1e,
  209. fmaxa_op = 0x1f, fcvts_op = 0x20,
  210. fcvtd_op = 0x21, fcvte_op = 0x22,
  211. fcvtw_op = 0x24, fcvtl_op = 0x25,
  212. fcmp_op = 0x30
  213. };
  214. /*
  215. * func field of cop1x opcodes (MIPS IV).
  216. */
  217. enum cop1x_func {
  218. lwxc1_op = 0x00, ldxc1_op = 0x01,
  219. swxc1_op = 0x08, sdxc1_op = 0x09,
  220. pfetch_op = 0x0f, madd_s_op = 0x20,
  221. madd_d_op = 0x21, madd_e_op = 0x22,
  222. msub_s_op = 0x28, msub_d_op = 0x29,
  223. msub_e_op = 0x2a, nmadd_s_op = 0x30,
  224. nmadd_d_op = 0x31, nmadd_e_op = 0x32,
  225. nmsub_s_op = 0x38, nmsub_d_op = 0x39,
  226. nmsub_e_op = 0x3a
  227. };
  228. /*
  229. * func field for mad opcodes (MIPS IV).
  230. */
  231. enum mad_func {
  232. madd_fp_op = 0x08, msub_fp_op = 0x0a,
  233. nmadd_fp_op = 0x0c, nmsub_fp_op = 0x0e
  234. };
  235. /*
  236. * func field for page table walker (Loongson-3).
  237. */
  238. enum ptw_func {
  239. lwdir_op = 0x00,
  240. lwpte_op = 0x01,
  241. lddir_op = 0x02,
  242. ldpte_op = 0x03,
  243. };
  244. /*
  245. * func field for special3 lx opcodes (Cavium Octeon).
  246. */
  247. enum lx_func {
  248. lwx_op = 0x00,
  249. lhx_op = 0x04,
  250. lbux_op = 0x06,
  251. ldx_op = 0x08,
  252. lwux_op = 0x10,
  253. lhux_op = 0x14,
  254. lbx_op = 0x16,
  255. };
  256. /*
  257. * BSHFL opcodes
  258. */
  259. enum bshfl_func {
  260. wsbh_op = 0x2,
  261. dshd_op = 0x5,
  262. seb_op = 0x10,
  263. seh_op = 0x18,
  264. };
  265. /*
  266. * MSA minor opcodes.
  267. */
  268. enum msa_func {
  269. msa_elm_op = 0x19,
  270. };
  271. /*
  272. * MSA ELM opcodes.
  273. */
  274. enum msa_elm {
  275. msa_ctc_op = 0x3e,
  276. msa_cfc_op = 0x7e,
  277. };
  278. /*
  279. * func field for MSA MI10 format.
  280. */
  281. enum msa_mi10_func {
  282. msa_ld_op = 8,
  283. msa_st_op = 9,
  284. };
  285. /*
  286. * MSA 2 bit format fields.
  287. */
  288. enum msa_2b_fmt {
  289. msa_fmt_b = 0,
  290. msa_fmt_h = 1,
  291. msa_fmt_w = 2,
  292. msa_fmt_d = 3,
  293. };
  294. /*
  295. * (microMIPS) Major opcodes.
  296. */
  297. enum mm_major_op {
  298. mm_pool32a_op, mm_pool16a_op, mm_lbu16_op, mm_move16_op,
  299. mm_addi32_op, mm_lbu32_op, mm_sb32_op, mm_lb32_op,
  300. mm_pool32b_op, mm_pool16b_op, mm_lhu16_op, mm_andi16_op,
  301. mm_addiu32_op, mm_lhu32_op, mm_sh32_op, mm_lh32_op,
  302. mm_pool32i_op, mm_pool16c_op, mm_lwsp16_op, mm_pool16d_op,
  303. mm_ori32_op, mm_pool32f_op, mm_pool32s_op, mm_reserved2_op,
  304. mm_pool32c_op, mm_lwgp16_op, mm_lw16_op, mm_pool16e_op,
  305. mm_xori32_op, mm_jals32_op, mm_addiupc_op, mm_reserved3_op,
  306. mm_reserved4_op, mm_pool16f_op, mm_sb16_op, mm_beqz16_op,
  307. mm_slti32_op, mm_beq32_op, mm_swc132_op, mm_lwc132_op,
  308. mm_reserved5_op, mm_reserved6_op, mm_sh16_op, mm_bnez16_op,
  309. mm_sltiu32_op, mm_bne32_op, mm_sdc132_op, mm_ldc132_op,
  310. mm_reserved7_op, mm_reserved8_op, mm_swsp16_op, mm_b16_op,
  311. mm_andi32_op, mm_j32_op, mm_sd32_op, mm_ld32_op,
  312. mm_reserved11_op, mm_reserved12_op, mm_sw16_op, mm_li16_op,
  313. mm_jalx32_op, mm_jal32_op, mm_sw32_op, mm_lw32_op,
  314. };
  315. /*
  316. * (microMIPS) POOL32I minor opcodes.
  317. */
  318. enum mm_32i_minor_op {
  319. mm_bltz_op, mm_bltzal_op, mm_bgez_op, mm_bgezal_op,
  320. mm_blez_op, mm_bnezc_op, mm_bgtz_op, mm_beqzc_op,
  321. mm_tlti_op, mm_tgei_op, mm_tltiu_op, mm_tgeiu_op,
  322. mm_tnei_op, mm_lui_op, mm_teqi_op, mm_reserved13_op,
  323. mm_synci_op, mm_bltzals_op, mm_reserved14_op, mm_bgezals_op,
  324. mm_bc2f_op, mm_bc2t_op, mm_reserved15_op, mm_reserved16_op,
  325. mm_reserved17_op, mm_reserved18_op, mm_bposge64_op, mm_bposge32_op,
  326. mm_bc1f_op, mm_bc1t_op, mm_reserved19_op, mm_reserved20_op,
  327. mm_bc1any2f_op, mm_bc1any2t_op, mm_bc1any4f_op, mm_bc1any4t_op,
  328. };
  329. /*
  330. * (microMIPS) POOL32A minor opcodes.
  331. */
  332. enum mm_32a_minor_op {
  333. mm_sll32_op = 0x000,
  334. mm_ins_op = 0x00c,
  335. mm_sllv32_op = 0x010,
  336. mm_ext_op = 0x02c,
  337. mm_pool32axf_op = 0x03c,
  338. mm_srl32_op = 0x040,
  339. mm_sra_op = 0x080,
  340. mm_srlv32_op = 0x090,
  341. mm_rotr_op = 0x0c0,
  342. mm_lwxs_op = 0x118,
  343. mm_addu32_op = 0x150,
  344. mm_subu32_op = 0x1d0,
  345. mm_wsbh_op = 0x1ec,
  346. mm_mul_op = 0x210,
  347. mm_and_op = 0x250,
  348. mm_or32_op = 0x290,
  349. mm_xor32_op = 0x310,
  350. mm_slt_op = 0x350,
  351. mm_sltu_op = 0x390,
  352. };
  353. /*
  354. * (microMIPS) POOL32B functions.
  355. */
  356. enum mm_32b_func {
  357. mm_lwc2_func = 0x0,
  358. mm_lwp_func = 0x1,
  359. mm_ldc2_func = 0x2,
  360. mm_ldp_func = 0x4,
  361. mm_lwm32_func = 0x5,
  362. mm_cache_func = 0x6,
  363. mm_ldm_func = 0x7,
  364. mm_swc2_func = 0x8,
  365. mm_swp_func = 0x9,
  366. mm_sdc2_func = 0xa,
  367. mm_sdp_func = 0xc,
  368. mm_swm32_func = 0xd,
  369. mm_sdm_func = 0xf,
  370. };
  371. /*
  372. * (microMIPS) POOL32C functions.
  373. */
  374. enum mm_32c_func {
  375. mm_pref_func = 0x2,
  376. mm_ll_func = 0x3,
  377. mm_swr_func = 0x9,
  378. mm_sc_func = 0xb,
  379. mm_lwu_func = 0xe,
  380. };
  381. /*
  382. * (microMIPS) POOL32AXF minor opcodes.
  383. */
  384. enum mm_32axf_minor_op {
  385. mm_mfc0_op = 0x003,
  386. mm_mtc0_op = 0x00b,
  387. mm_tlbp_op = 0x00d,
  388. mm_mfhi32_op = 0x035,
  389. mm_jalr_op = 0x03c,
  390. mm_tlbr_op = 0x04d,
  391. mm_mflo32_op = 0x075,
  392. mm_jalrhb_op = 0x07c,
  393. mm_tlbwi_op = 0x08d,
  394. mm_mthi32_op = 0x0b5,
  395. mm_tlbwr_op = 0x0cd,
  396. mm_mtlo32_op = 0x0f5,
  397. mm_di_op = 0x11d,
  398. mm_jalrs_op = 0x13c,
  399. mm_jalrshb_op = 0x17c,
  400. mm_sync_op = 0x1ad,
  401. mm_syscall_op = 0x22d,
  402. mm_wait_op = 0x24d,
  403. mm_eret_op = 0x3cd,
  404. mm_divu_op = 0x5dc,
  405. };
  406. /*
  407. * (microMIPS) POOL32F minor opcodes.
  408. */
  409. enum mm_32f_minor_op {
  410. mm_32f_00_op = 0x00,
  411. mm_32f_01_op = 0x01,
  412. mm_32f_02_op = 0x02,
  413. mm_32f_10_op = 0x08,
  414. mm_32f_11_op = 0x09,
  415. mm_32f_12_op = 0x0a,
  416. mm_32f_20_op = 0x10,
  417. mm_32f_30_op = 0x18,
  418. mm_32f_40_op = 0x20,
  419. mm_32f_41_op = 0x21,
  420. mm_32f_42_op = 0x22,
  421. mm_32f_50_op = 0x28,
  422. mm_32f_51_op = 0x29,
  423. mm_32f_52_op = 0x2a,
  424. mm_32f_60_op = 0x30,
  425. mm_32f_70_op = 0x38,
  426. mm_32f_73_op = 0x3b,
  427. mm_32f_74_op = 0x3c,
  428. };
  429. /*
  430. * (microMIPS) POOL32F secondary minor opcodes.
  431. */
  432. enum mm_32f_10_minor_op {
  433. mm_lwxc1_op = 0x1,
  434. mm_swxc1_op,
  435. mm_ldxc1_op,
  436. mm_sdxc1_op,
  437. mm_luxc1_op,
  438. mm_suxc1_op,
  439. };
  440. enum mm_32f_func {
  441. mm_lwxc1_func = 0x048,
  442. mm_swxc1_func = 0x088,
  443. mm_ldxc1_func = 0x0c8,
  444. mm_sdxc1_func = 0x108,
  445. };
  446. /*
  447. * (microMIPS) POOL32F secondary minor opcodes.
  448. */
  449. enum mm_32f_40_minor_op {
  450. mm_fmovf_op,
  451. mm_fmovt_op,
  452. };
  453. /*
  454. * (microMIPS) POOL32F secondary minor opcodes.
  455. */
  456. enum mm_32f_60_minor_op {
  457. mm_fadd_op,
  458. mm_fsub_op,
  459. mm_fmul_op,
  460. mm_fdiv_op,
  461. };
  462. /*
  463. * (microMIPS) POOL32F secondary minor opcodes.
  464. */
  465. enum mm_32f_70_minor_op {
  466. mm_fmovn_op,
  467. mm_fmovz_op,
  468. };
  469. /*
  470. * (microMIPS) POOL32FXF secondary minor opcodes for POOL32F.
  471. */
  472. enum mm_32f_73_minor_op {
  473. mm_fmov0_op = 0x01,
  474. mm_fcvtl_op = 0x04,
  475. mm_movf0_op = 0x05,
  476. mm_frsqrt_op = 0x08,
  477. mm_ffloorl_op = 0x0c,
  478. mm_fabs0_op = 0x0d,
  479. mm_fcvtw_op = 0x24,
  480. mm_movt0_op = 0x25,
  481. mm_fsqrt_op = 0x28,
  482. mm_ffloorw_op = 0x2c,
  483. mm_fneg0_op = 0x2d,
  484. mm_cfc1_op = 0x40,
  485. mm_frecip_op = 0x48,
  486. mm_fceill_op = 0x4c,
  487. mm_fcvtd0_op = 0x4d,
  488. mm_ctc1_op = 0x60,
  489. mm_fceilw_op = 0x6c,
  490. mm_fcvts0_op = 0x6d,
  491. mm_mfc1_op = 0x80,
  492. mm_fmov1_op = 0x81,
  493. mm_movf1_op = 0x85,
  494. mm_ftruncl_op = 0x8c,
  495. mm_fabs1_op = 0x8d,
  496. mm_mtc1_op = 0xa0,
  497. mm_movt1_op = 0xa5,
  498. mm_ftruncw_op = 0xac,
  499. mm_fneg1_op = 0xad,
  500. mm_mfhc1_op = 0xc0,
  501. mm_froundl_op = 0xcc,
  502. mm_fcvtd1_op = 0xcd,
  503. mm_mthc1_op = 0xe0,
  504. mm_froundw_op = 0xec,
  505. mm_fcvts1_op = 0xed,
  506. };
  507. /*
  508. * (microMIPS) POOL32S minor opcodes.
  509. */
  510. enum mm_32s_minor_op {
  511. mm_32s_elm_op = 0x16,
  512. };
  513. /*
  514. * (microMIPS) POOL16C minor opcodes.
  515. */
  516. enum mm_16c_minor_op {
  517. mm_lwm16_op = 0x04,
  518. mm_swm16_op = 0x05,
  519. mm_jr16_op = 0x0c,
  520. mm_jrc_op = 0x0d,
  521. mm_jalr16_op = 0x0e,
  522. mm_jalrs16_op = 0x0f,
  523. mm_jraddiusp_op = 0x18,
  524. };
  525. /*
  526. * (microMIPS) POOL16D minor opcodes.
  527. */
  528. enum mm_16d_minor_op {
  529. mm_addius5_func,
  530. mm_addiusp_func,
  531. };
  532. /*
  533. * (MIPS16e) opcodes.
  534. */
  535. enum MIPS16e_ops {
  536. MIPS16e_jal_op = 003,
  537. MIPS16e_ld_op = 007,
  538. MIPS16e_i8_op = 014,
  539. MIPS16e_sd_op = 017,
  540. MIPS16e_lb_op = 020,
  541. MIPS16e_lh_op = 021,
  542. MIPS16e_lwsp_op = 022,
  543. MIPS16e_lw_op = 023,
  544. MIPS16e_lbu_op = 024,
  545. MIPS16e_lhu_op = 025,
  546. MIPS16e_lwpc_op = 026,
  547. MIPS16e_lwu_op = 027,
  548. MIPS16e_sb_op = 030,
  549. MIPS16e_sh_op = 031,
  550. MIPS16e_swsp_op = 032,
  551. MIPS16e_sw_op = 033,
  552. MIPS16e_rr_op = 035,
  553. MIPS16e_extend_op = 036,
  554. MIPS16e_i64_op = 037,
  555. };
  556. enum MIPS16e_i64_func {
  557. MIPS16e_ldsp_func,
  558. MIPS16e_sdsp_func,
  559. MIPS16e_sdrasp_func,
  560. MIPS16e_dadjsp_func,
  561. MIPS16e_ldpc_func,
  562. };
  563. enum MIPS16e_rr_func {
  564. MIPS16e_jr_func,
  565. };
  566. enum MIPS6e_i8_func {
  567. MIPS16e_swrasp_func = 02,
  568. };
  569. /*
  570. * (microMIPS) NOP instruction.
  571. */
  572. #define MM_NOP16 0x0c00
  573. struct j_format {
  574. __BITFIELD_FIELD(unsigned int opcode : 6, /* Jump format */
  575. __BITFIELD_FIELD(unsigned int target : 26,
  576. ;))
  577. };
  578. struct i_format { /* signed immediate format */
  579. __BITFIELD_FIELD(unsigned int opcode : 6,
  580. __BITFIELD_FIELD(unsigned int rs : 5,
  581. __BITFIELD_FIELD(unsigned int rt : 5,
  582. __BITFIELD_FIELD(signed int simmediate : 16,
  583. ;))))
  584. };
  585. struct u_format { /* unsigned immediate format */
  586. __BITFIELD_FIELD(unsigned int opcode : 6,
  587. __BITFIELD_FIELD(unsigned int rs : 5,
  588. __BITFIELD_FIELD(unsigned int rt : 5,
  589. __BITFIELD_FIELD(unsigned int uimmediate : 16,
  590. ;))))
  591. };
  592. struct c_format { /* Cache (>= R6000) format */
  593. __BITFIELD_FIELD(unsigned int opcode : 6,
  594. __BITFIELD_FIELD(unsigned int rs : 5,
  595. __BITFIELD_FIELD(unsigned int c_op : 3,
  596. __BITFIELD_FIELD(unsigned int cache : 2,
  597. __BITFIELD_FIELD(unsigned int simmediate : 16,
  598. ;)))))
  599. };
  600. struct r_format { /* Register format */
  601. __BITFIELD_FIELD(unsigned int opcode : 6,
  602. __BITFIELD_FIELD(unsigned int rs : 5,
  603. __BITFIELD_FIELD(unsigned int rt : 5,
  604. __BITFIELD_FIELD(unsigned int rd : 5,
  605. __BITFIELD_FIELD(unsigned int re : 5,
  606. __BITFIELD_FIELD(unsigned int func : 6,
  607. ;))))))
  608. };
  609. struct c0r_format { /* C0 register format */
  610. __BITFIELD_FIELD(unsigned int opcode : 6,
  611. __BITFIELD_FIELD(unsigned int rs : 5,
  612. __BITFIELD_FIELD(unsigned int rt : 5,
  613. __BITFIELD_FIELD(unsigned int rd : 5,
  614. __BITFIELD_FIELD(unsigned int z: 8,
  615. __BITFIELD_FIELD(unsigned int sel : 3,
  616. ;))))))
  617. };
  618. struct mfmc0_format { /* MFMC0 register format */
  619. __BITFIELD_FIELD(unsigned int opcode : 6,
  620. __BITFIELD_FIELD(unsigned int rs : 5,
  621. __BITFIELD_FIELD(unsigned int rt : 5,
  622. __BITFIELD_FIELD(unsigned int rd : 5,
  623. __BITFIELD_FIELD(unsigned int re : 5,
  624. __BITFIELD_FIELD(unsigned int sc : 1,
  625. __BITFIELD_FIELD(unsigned int : 2,
  626. __BITFIELD_FIELD(unsigned int sel : 3,
  627. ;))))))))
  628. };
  629. struct co_format { /* C0 CO format */
  630. __BITFIELD_FIELD(unsigned int opcode : 6,
  631. __BITFIELD_FIELD(unsigned int co : 1,
  632. __BITFIELD_FIELD(unsigned int code : 19,
  633. __BITFIELD_FIELD(unsigned int func : 6,
  634. ;))))
  635. };
  636. struct p_format { /* Performance counter format (R10000) */
  637. __BITFIELD_FIELD(unsigned int opcode : 6,
  638. __BITFIELD_FIELD(unsigned int rs : 5,
  639. __BITFIELD_FIELD(unsigned int rt : 5,
  640. __BITFIELD_FIELD(unsigned int rd : 5,
  641. __BITFIELD_FIELD(unsigned int re : 5,
  642. __BITFIELD_FIELD(unsigned int func : 6,
  643. ;))))))
  644. };
  645. struct f_format { /* FPU register format */
  646. __BITFIELD_FIELD(unsigned int opcode : 6,
  647. __BITFIELD_FIELD(unsigned int : 1,
  648. __BITFIELD_FIELD(unsigned int fmt : 4,
  649. __BITFIELD_FIELD(unsigned int rt : 5,
  650. __BITFIELD_FIELD(unsigned int rd : 5,
  651. __BITFIELD_FIELD(unsigned int re : 5,
  652. __BITFIELD_FIELD(unsigned int func : 6,
  653. ;)))))))
  654. };
  655. struct ma_format { /* FPU multiply and add format (MIPS IV) */
  656. __BITFIELD_FIELD(unsigned int opcode : 6,
  657. __BITFIELD_FIELD(unsigned int fr : 5,
  658. __BITFIELD_FIELD(unsigned int ft : 5,
  659. __BITFIELD_FIELD(unsigned int fs : 5,
  660. __BITFIELD_FIELD(unsigned int fd : 5,
  661. __BITFIELD_FIELD(unsigned int func : 4,
  662. __BITFIELD_FIELD(unsigned int fmt : 2,
  663. ;)))))))
  664. };
  665. struct b_format { /* BREAK and SYSCALL */
  666. __BITFIELD_FIELD(unsigned int opcode : 6,
  667. __BITFIELD_FIELD(unsigned int code : 20,
  668. __BITFIELD_FIELD(unsigned int func : 6,
  669. ;)))
  670. };
  671. struct ps_format { /* MIPS-3D / paired single format */
  672. __BITFIELD_FIELD(unsigned int opcode : 6,
  673. __BITFIELD_FIELD(unsigned int rs : 5,
  674. __BITFIELD_FIELD(unsigned int ft : 5,
  675. __BITFIELD_FIELD(unsigned int fs : 5,
  676. __BITFIELD_FIELD(unsigned int fd : 5,
  677. __BITFIELD_FIELD(unsigned int func : 6,
  678. ;))))))
  679. };
  680. struct v_format { /* MDMX vector format */
  681. __BITFIELD_FIELD(unsigned int opcode : 6,
  682. __BITFIELD_FIELD(unsigned int sel : 4,
  683. __BITFIELD_FIELD(unsigned int fmt : 1,
  684. __BITFIELD_FIELD(unsigned int vt : 5,
  685. __BITFIELD_FIELD(unsigned int vs : 5,
  686. __BITFIELD_FIELD(unsigned int vd : 5,
  687. __BITFIELD_FIELD(unsigned int func : 6,
  688. ;)))))))
  689. };
  690. struct msa_mi10_format { /* MSA MI10 */
  691. __BITFIELD_FIELD(unsigned int opcode : 6,
  692. __BITFIELD_FIELD(signed int s10 : 10,
  693. __BITFIELD_FIELD(unsigned int rs : 5,
  694. __BITFIELD_FIELD(unsigned int wd : 5,
  695. __BITFIELD_FIELD(unsigned int func : 4,
  696. __BITFIELD_FIELD(unsigned int df : 2,
  697. ;))))))
  698. };
  699. struct spec3_format { /* SPEC3 */
  700. __BITFIELD_FIELD(unsigned int opcode:6,
  701. __BITFIELD_FIELD(unsigned int rs:5,
  702. __BITFIELD_FIELD(unsigned int rt:5,
  703. __BITFIELD_FIELD(signed int simmediate:9,
  704. __BITFIELD_FIELD(unsigned int func:7,
  705. ;)))))
  706. };
  707. /*
  708. * microMIPS instruction formats (32-bit length)
  709. *
  710. * NOTE:
  711. * Parenthesis denote whether the format is a microMIPS instruction or
  712. * if it is MIPS32 instruction re-encoded for use in the microMIPS ASE.
  713. */
  714. struct fb_format { /* FPU branch format (MIPS32) */
  715. __BITFIELD_FIELD(unsigned int opcode : 6,
  716. __BITFIELD_FIELD(unsigned int bc : 5,
  717. __BITFIELD_FIELD(unsigned int cc : 3,
  718. __BITFIELD_FIELD(unsigned int flag : 2,
  719. __BITFIELD_FIELD(signed int simmediate : 16,
  720. ;)))))
  721. };
  722. struct fp0_format { /* FPU multiply and add format (MIPS32) */
  723. __BITFIELD_FIELD(unsigned int opcode : 6,
  724. __BITFIELD_FIELD(unsigned int fmt : 5,
  725. __BITFIELD_FIELD(unsigned int ft : 5,
  726. __BITFIELD_FIELD(unsigned int fs : 5,
  727. __BITFIELD_FIELD(unsigned int fd : 5,
  728. __BITFIELD_FIELD(unsigned int func : 6,
  729. ;))))))
  730. };
  731. struct mm_fp0_format { /* FPU multiply and add format (microMIPS) */
  732. __BITFIELD_FIELD(unsigned int opcode : 6,
  733. __BITFIELD_FIELD(unsigned int ft : 5,
  734. __BITFIELD_FIELD(unsigned int fs : 5,
  735. __BITFIELD_FIELD(unsigned int fd : 5,
  736. __BITFIELD_FIELD(unsigned int fmt : 3,
  737. __BITFIELD_FIELD(unsigned int op : 2,
  738. __BITFIELD_FIELD(unsigned int func : 6,
  739. ;)))))))
  740. };
  741. struct fp1_format { /* FPU mfc1 and cfc1 format (MIPS32) */
  742. __BITFIELD_FIELD(unsigned int opcode : 6,
  743. __BITFIELD_FIELD(unsigned int op : 5,
  744. __BITFIELD_FIELD(unsigned int rt : 5,
  745. __BITFIELD_FIELD(unsigned int fs : 5,
  746. __BITFIELD_FIELD(unsigned int fd : 5,
  747. __BITFIELD_FIELD(unsigned int func : 6,
  748. ;))))))
  749. };
  750. struct mm_fp1_format { /* FPU mfc1 and cfc1 format (microMIPS) */
  751. __BITFIELD_FIELD(unsigned int opcode : 6,
  752. __BITFIELD_FIELD(unsigned int rt : 5,
  753. __BITFIELD_FIELD(unsigned int fs : 5,
  754. __BITFIELD_FIELD(unsigned int fmt : 2,
  755. __BITFIELD_FIELD(unsigned int op : 8,
  756. __BITFIELD_FIELD(unsigned int func : 6,
  757. ;))))))
  758. };
  759. struct mm_fp2_format { /* FPU movt and movf format (microMIPS) */
  760. __BITFIELD_FIELD(unsigned int opcode : 6,
  761. __BITFIELD_FIELD(unsigned int fd : 5,
  762. __BITFIELD_FIELD(unsigned int fs : 5,
  763. __BITFIELD_FIELD(unsigned int cc : 3,
  764. __BITFIELD_FIELD(unsigned int zero : 2,
  765. __BITFIELD_FIELD(unsigned int fmt : 2,
  766. __BITFIELD_FIELD(unsigned int op : 3,
  767. __BITFIELD_FIELD(unsigned int func : 6,
  768. ;))))))))
  769. };
  770. struct mm_fp3_format { /* FPU abs and neg format (microMIPS) */
  771. __BITFIELD_FIELD(unsigned int opcode : 6,
  772. __BITFIELD_FIELD(unsigned int rt : 5,
  773. __BITFIELD_FIELD(unsigned int fs : 5,
  774. __BITFIELD_FIELD(unsigned int fmt : 3,
  775. __BITFIELD_FIELD(unsigned int op : 7,
  776. __BITFIELD_FIELD(unsigned int func : 6,
  777. ;))))))
  778. };
  779. struct mm_fp4_format { /* FPU c.cond format (microMIPS) */
  780. __BITFIELD_FIELD(unsigned int opcode : 6,
  781. __BITFIELD_FIELD(unsigned int rt : 5,
  782. __BITFIELD_FIELD(unsigned int fs : 5,
  783. __BITFIELD_FIELD(unsigned int cc : 3,
  784. __BITFIELD_FIELD(unsigned int fmt : 3,
  785. __BITFIELD_FIELD(unsigned int cond : 4,
  786. __BITFIELD_FIELD(unsigned int func : 6,
  787. ;)))))))
  788. };
  789. struct mm_fp5_format { /* FPU lwxc1 and swxc1 format (microMIPS) */
  790. __BITFIELD_FIELD(unsigned int opcode : 6,
  791. __BITFIELD_FIELD(unsigned int index : 5,
  792. __BITFIELD_FIELD(unsigned int base : 5,
  793. __BITFIELD_FIELD(unsigned int fd : 5,
  794. __BITFIELD_FIELD(unsigned int op : 5,
  795. __BITFIELD_FIELD(unsigned int func : 6,
  796. ;))))))
  797. };
  798. struct fp6_format { /* FPU madd and msub format (MIPS IV) */
  799. __BITFIELD_FIELD(unsigned int opcode : 6,
  800. __BITFIELD_FIELD(unsigned int fr : 5,
  801. __BITFIELD_FIELD(unsigned int ft : 5,
  802. __BITFIELD_FIELD(unsigned int fs : 5,
  803. __BITFIELD_FIELD(unsigned int fd : 5,
  804. __BITFIELD_FIELD(unsigned int func : 6,
  805. ;))))))
  806. };
  807. struct mm_fp6_format { /* FPU madd and msub format (microMIPS) */
  808. __BITFIELD_FIELD(unsigned int opcode : 6,
  809. __BITFIELD_FIELD(unsigned int ft : 5,
  810. __BITFIELD_FIELD(unsigned int fs : 5,
  811. __BITFIELD_FIELD(unsigned int fd : 5,
  812. __BITFIELD_FIELD(unsigned int fr : 5,
  813. __BITFIELD_FIELD(unsigned int func : 6,
  814. ;))))))
  815. };
  816. struct mm_i_format { /* Immediate format (microMIPS) */
  817. __BITFIELD_FIELD(unsigned int opcode : 6,
  818. __BITFIELD_FIELD(unsigned int rt : 5,
  819. __BITFIELD_FIELD(unsigned int rs : 5,
  820. __BITFIELD_FIELD(signed int simmediate : 16,
  821. ;))))
  822. };
  823. struct mm_m_format { /* Multi-word load/store format (microMIPS) */
  824. __BITFIELD_FIELD(unsigned int opcode : 6,
  825. __BITFIELD_FIELD(unsigned int rd : 5,
  826. __BITFIELD_FIELD(unsigned int base : 5,
  827. __BITFIELD_FIELD(unsigned int func : 4,
  828. __BITFIELD_FIELD(signed int simmediate : 12,
  829. ;)))))
  830. };
  831. struct mm_x_format { /* Scaled indexed load format (microMIPS) */
  832. __BITFIELD_FIELD(unsigned int opcode : 6,
  833. __BITFIELD_FIELD(unsigned int index : 5,
  834. __BITFIELD_FIELD(unsigned int base : 5,
  835. __BITFIELD_FIELD(unsigned int rd : 5,
  836. __BITFIELD_FIELD(unsigned int func : 11,
  837. ;)))))
  838. };
  839. struct mm_a_format { /* ADDIUPC format (microMIPS) */
  840. __BITFIELD_FIELD(unsigned int opcode : 6,
  841. __BITFIELD_FIELD(unsigned int rs : 3,
  842. __BITFIELD_FIELD(signed int simmediate : 23,
  843. ;)))
  844. };
  845. /*
  846. * microMIPS instruction formats (16-bit length)
  847. */
  848. struct mm_b0_format { /* Unconditional branch format (microMIPS) */
  849. __BITFIELD_FIELD(unsigned int opcode : 6,
  850. __BITFIELD_FIELD(signed int simmediate : 10,
  851. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  852. ;)))
  853. };
  854. struct mm_b1_format { /* Conditional branch format (microMIPS) */
  855. __BITFIELD_FIELD(unsigned int opcode : 6,
  856. __BITFIELD_FIELD(unsigned int rs : 3,
  857. __BITFIELD_FIELD(signed int simmediate : 7,
  858. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  859. ;))))
  860. };
  861. struct mm16_m_format { /* Multi-word load/store format */
  862. __BITFIELD_FIELD(unsigned int opcode : 6,
  863. __BITFIELD_FIELD(unsigned int func : 4,
  864. __BITFIELD_FIELD(unsigned int rlist : 2,
  865. __BITFIELD_FIELD(unsigned int imm : 4,
  866. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  867. ;)))))
  868. };
  869. struct mm16_rb_format { /* Signed immediate format */
  870. __BITFIELD_FIELD(unsigned int opcode : 6,
  871. __BITFIELD_FIELD(unsigned int rt : 3,
  872. __BITFIELD_FIELD(unsigned int base : 3,
  873. __BITFIELD_FIELD(signed int simmediate : 4,
  874. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  875. ;)))))
  876. };
  877. struct mm16_r3_format { /* Load from global pointer format */
  878. __BITFIELD_FIELD(unsigned int opcode : 6,
  879. __BITFIELD_FIELD(unsigned int rt : 3,
  880. __BITFIELD_FIELD(signed int simmediate : 7,
  881. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  882. ;))))
  883. };
  884. struct mm16_r5_format { /* Load/store from stack pointer format */
  885. __BITFIELD_FIELD(unsigned int opcode : 6,
  886. __BITFIELD_FIELD(unsigned int rt : 5,
  887. __BITFIELD_FIELD(signed int simmediate : 5,
  888. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  889. ;))))
  890. };
  891. /*
  892. * MIPS16e instruction formats (16-bit length)
  893. */
  894. struct m16e_rr {
  895. __BITFIELD_FIELD(unsigned int opcode : 5,
  896. __BITFIELD_FIELD(unsigned int rx : 3,
  897. __BITFIELD_FIELD(unsigned int nd : 1,
  898. __BITFIELD_FIELD(unsigned int l : 1,
  899. __BITFIELD_FIELD(unsigned int ra : 1,
  900. __BITFIELD_FIELD(unsigned int func : 5,
  901. ;))))))
  902. };
  903. struct m16e_jal {
  904. __BITFIELD_FIELD(unsigned int opcode : 5,
  905. __BITFIELD_FIELD(unsigned int x : 1,
  906. __BITFIELD_FIELD(unsigned int imm20_16 : 5,
  907. __BITFIELD_FIELD(signed int imm25_21 : 5,
  908. ;))))
  909. };
  910. struct m16e_i64 {
  911. __BITFIELD_FIELD(unsigned int opcode : 5,
  912. __BITFIELD_FIELD(unsigned int func : 3,
  913. __BITFIELD_FIELD(unsigned int imm : 8,
  914. ;)))
  915. };
  916. struct m16e_ri64 {
  917. __BITFIELD_FIELD(unsigned int opcode : 5,
  918. __BITFIELD_FIELD(unsigned int func : 3,
  919. __BITFIELD_FIELD(unsigned int ry : 3,
  920. __BITFIELD_FIELD(unsigned int imm : 5,
  921. ;))))
  922. };
  923. struct m16e_ri {
  924. __BITFIELD_FIELD(unsigned int opcode : 5,
  925. __BITFIELD_FIELD(unsigned int rx : 3,
  926. __BITFIELD_FIELD(unsigned int imm : 8,
  927. ;)))
  928. };
  929. struct m16e_rri {
  930. __BITFIELD_FIELD(unsigned int opcode : 5,
  931. __BITFIELD_FIELD(unsigned int rx : 3,
  932. __BITFIELD_FIELD(unsigned int ry : 3,
  933. __BITFIELD_FIELD(unsigned int imm : 5,
  934. ;))))
  935. };
  936. struct m16e_i8 {
  937. __BITFIELD_FIELD(unsigned int opcode : 5,
  938. __BITFIELD_FIELD(unsigned int func : 3,
  939. __BITFIELD_FIELD(unsigned int imm : 8,
  940. ;)))
  941. };
  942. union mips_instruction {
  943. unsigned int word;
  944. unsigned short halfword[2];
  945. unsigned char byte[4];
  946. struct j_format j_format;
  947. struct i_format i_format;
  948. struct u_format u_format;
  949. struct c_format c_format;
  950. struct r_format r_format;
  951. struct c0r_format c0r_format;
  952. struct mfmc0_format mfmc0_format;
  953. struct co_format co_format;
  954. struct p_format p_format;
  955. struct f_format f_format;
  956. struct ma_format ma_format;
  957. struct msa_mi10_format msa_mi10_format;
  958. struct b_format b_format;
  959. struct ps_format ps_format;
  960. struct v_format v_format;
  961. struct spec3_format spec3_format;
  962. struct fb_format fb_format;
  963. struct fp0_format fp0_format;
  964. struct mm_fp0_format mm_fp0_format;
  965. struct fp1_format fp1_format;
  966. struct mm_fp1_format mm_fp1_format;
  967. struct mm_fp2_format mm_fp2_format;
  968. struct mm_fp3_format mm_fp3_format;
  969. struct mm_fp4_format mm_fp4_format;
  970. struct mm_fp5_format mm_fp5_format;
  971. struct fp6_format fp6_format;
  972. struct mm_fp6_format mm_fp6_format;
  973. struct mm_i_format mm_i_format;
  974. struct mm_m_format mm_m_format;
  975. struct mm_x_format mm_x_format;
  976. struct mm_a_format mm_a_format;
  977. struct mm_b0_format mm_b0_format;
  978. struct mm_b1_format mm_b1_format;
  979. struct mm16_m_format mm16_m_format ;
  980. struct mm16_rb_format mm16_rb_format;
  981. struct mm16_r3_format mm16_r3_format;
  982. struct mm16_r5_format mm16_r5_format;
  983. };
  984. union mips16e_instruction {
  985. unsigned int full : 16;
  986. struct m16e_rr rr;
  987. struct m16e_jal jal;
  988. struct m16e_i64 i64;
  989. struct m16e_ri64 ri64;
  990. struct m16e_ri ri;
  991. struct m16e_rri rri;
  992. struct m16e_i8 i8;
  993. };
  994. #endif /* _UAPI_ASM_INST_H */