inst.h 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102
  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, hypcall_op = 0x28
  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. seb_op = 0x10,
  262. seh_op = 0x18,
  263. };
  264. /*
  265. * DBSHFL opcodes
  266. */
  267. enum dbshfl_func {
  268. dsbh_op = 0x2,
  269. dshd_op = 0x5,
  270. };
  271. /*
  272. * MSA minor opcodes.
  273. */
  274. enum msa_func {
  275. msa_elm_op = 0x19,
  276. };
  277. /*
  278. * MSA ELM opcodes.
  279. */
  280. enum msa_elm {
  281. msa_ctc_op = 0x3e,
  282. msa_cfc_op = 0x7e,
  283. };
  284. /*
  285. * func field for MSA MI10 format.
  286. */
  287. enum msa_mi10_func {
  288. msa_ld_op = 8,
  289. msa_st_op = 9,
  290. };
  291. /*
  292. * MSA 2 bit format fields.
  293. */
  294. enum msa_2b_fmt {
  295. msa_fmt_b = 0,
  296. msa_fmt_h = 1,
  297. msa_fmt_w = 2,
  298. msa_fmt_d = 3,
  299. };
  300. /*
  301. * (microMIPS) Major opcodes.
  302. */
  303. enum mm_major_op {
  304. mm_pool32a_op, mm_pool16a_op, mm_lbu16_op, mm_move16_op,
  305. mm_addi32_op, mm_lbu32_op, mm_sb32_op, mm_lb32_op,
  306. mm_pool32b_op, mm_pool16b_op, mm_lhu16_op, mm_andi16_op,
  307. mm_addiu32_op, mm_lhu32_op, mm_sh32_op, mm_lh32_op,
  308. mm_pool32i_op, mm_pool16c_op, mm_lwsp16_op, mm_pool16d_op,
  309. mm_ori32_op, mm_pool32f_op, mm_pool32s_op, mm_reserved2_op,
  310. mm_pool32c_op, mm_lwgp16_op, mm_lw16_op, mm_pool16e_op,
  311. mm_xori32_op, mm_jals32_op, mm_addiupc_op, mm_reserved3_op,
  312. mm_reserved4_op, mm_pool16f_op, mm_sb16_op, mm_beqz16_op,
  313. mm_slti32_op, mm_beq32_op, mm_swc132_op, mm_lwc132_op,
  314. mm_reserved5_op, mm_reserved6_op, mm_sh16_op, mm_bnez16_op,
  315. mm_sltiu32_op, mm_bne32_op, mm_sdc132_op, mm_ldc132_op,
  316. mm_reserved7_op, mm_reserved8_op, mm_swsp16_op, mm_b16_op,
  317. mm_andi32_op, mm_j32_op, mm_sd32_op, mm_ld32_op,
  318. mm_reserved11_op, mm_reserved12_op, mm_sw16_op, mm_li16_op,
  319. mm_jalx32_op, mm_jal32_op, mm_sw32_op, mm_lw32_op,
  320. };
  321. /*
  322. * (microMIPS) POOL32I minor opcodes.
  323. */
  324. enum mm_32i_minor_op {
  325. mm_bltz_op, mm_bltzal_op, mm_bgez_op, mm_bgezal_op,
  326. mm_blez_op, mm_bnezc_op, mm_bgtz_op, mm_beqzc_op,
  327. mm_tlti_op, mm_tgei_op, mm_tltiu_op, mm_tgeiu_op,
  328. mm_tnei_op, mm_lui_op, mm_teqi_op, mm_reserved13_op,
  329. mm_synci_op, mm_bltzals_op, mm_reserved14_op, mm_bgezals_op,
  330. mm_bc2f_op, mm_bc2t_op, mm_reserved15_op, mm_reserved16_op,
  331. mm_reserved17_op, mm_reserved18_op, mm_bposge64_op, mm_bposge32_op,
  332. mm_bc1f_op, mm_bc1t_op, mm_reserved19_op, mm_reserved20_op,
  333. mm_bc1any2f_op, mm_bc1any2t_op, mm_bc1any4f_op, mm_bc1any4t_op,
  334. };
  335. /*
  336. * (microMIPS) POOL32A minor opcodes.
  337. */
  338. enum mm_32a_minor_op {
  339. mm_sll32_op = 0x000,
  340. mm_ins_op = 0x00c,
  341. mm_sllv32_op = 0x010,
  342. mm_ext_op = 0x02c,
  343. mm_pool32axf_op = 0x03c,
  344. mm_srl32_op = 0x040,
  345. mm_sra_op = 0x080,
  346. mm_srlv32_op = 0x090,
  347. mm_rotr_op = 0x0c0,
  348. mm_lwxs_op = 0x118,
  349. mm_addu32_op = 0x150,
  350. mm_subu32_op = 0x1d0,
  351. mm_wsbh_op = 0x1ec,
  352. mm_mul_op = 0x210,
  353. mm_and_op = 0x250,
  354. mm_or32_op = 0x290,
  355. mm_xor32_op = 0x310,
  356. mm_slt_op = 0x350,
  357. mm_sltu_op = 0x390,
  358. };
  359. /*
  360. * (microMIPS) POOL32B functions.
  361. */
  362. enum mm_32b_func {
  363. mm_lwc2_func = 0x0,
  364. mm_lwp_func = 0x1,
  365. mm_ldc2_func = 0x2,
  366. mm_ldp_func = 0x4,
  367. mm_lwm32_func = 0x5,
  368. mm_cache_func = 0x6,
  369. mm_ldm_func = 0x7,
  370. mm_swc2_func = 0x8,
  371. mm_swp_func = 0x9,
  372. mm_sdc2_func = 0xa,
  373. mm_sdp_func = 0xc,
  374. mm_swm32_func = 0xd,
  375. mm_sdm_func = 0xf,
  376. };
  377. /*
  378. * (microMIPS) POOL32C functions.
  379. */
  380. enum mm_32c_func {
  381. mm_pref_func = 0x2,
  382. mm_ll_func = 0x3,
  383. mm_swr_func = 0x9,
  384. mm_sc_func = 0xb,
  385. mm_lwu_func = 0xe,
  386. };
  387. /*
  388. * (microMIPS) POOL32AXF minor opcodes.
  389. */
  390. enum mm_32axf_minor_op {
  391. mm_mfc0_op = 0x003,
  392. mm_mtc0_op = 0x00b,
  393. mm_tlbp_op = 0x00d,
  394. mm_mfhi32_op = 0x035,
  395. mm_jalr_op = 0x03c,
  396. mm_tlbr_op = 0x04d,
  397. mm_mflo32_op = 0x075,
  398. mm_jalrhb_op = 0x07c,
  399. mm_tlbwi_op = 0x08d,
  400. mm_mthi32_op = 0x0b5,
  401. mm_tlbwr_op = 0x0cd,
  402. mm_mtlo32_op = 0x0f5,
  403. mm_di_op = 0x11d,
  404. mm_jalrs_op = 0x13c,
  405. mm_jalrshb_op = 0x17c,
  406. mm_sync_op = 0x1ad,
  407. mm_syscall_op = 0x22d,
  408. mm_wait_op = 0x24d,
  409. mm_eret_op = 0x3cd,
  410. mm_divu_op = 0x5dc,
  411. };
  412. /*
  413. * (microMIPS) POOL32F minor opcodes.
  414. */
  415. enum mm_32f_minor_op {
  416. mm_32f_00_op = 0x00,
  417. mm_32f_01_op = 0x01,
  418. mm_32f_02_op = 0x02,
  419. mm_32f_10_op = 0x08,
  420. mm_32f_11_op = 0x09,
  421. mm_32f_12_op = 0x0a,
  422. mm_32f_20_op = 0x10,
  423. mm_32f_30_op = 0x18,
  424. mm_32f_40_op = 0x20,
  425. mm_32f_41_op = 0x21,
  426. mm_32f_42_op = 0x22,
  427. mm_32f_50_op = 0x28,
  428. mm_32f_51_op = 0x29,
  429. mm_32f_52_op = 0x2a,
  430. mm_32f_60_op = 0x30,
  431. mm_32f_70_op = 0x38,
  432. mm_32f_73_op = 0x3b,
  433. mm_32f_74_op = 0x3c,
  434. };
  435. /*
  436. * (microMIPS) POOL32F secondary minor opcodes.
  437. */
  438. enum mm_32f_10_minor_op {
  439. mm_lwxc1_op = 0x1,
  440. mm_swxc1_op,
  441. mm_ldxc1_op,
  442. mm_sdxc1_op,
  443. mm_luxc1_op,
  444. mm_suxc1_op,
  445. };
  446. enum mm_32f_func {
  447. mm_lwxc1_func = 0x048,
  448. mm_swxc1_func = 0x088,
  449. mm_ldxc1_func = 0x0c8,
  450. mm_sdxc1_func = 0x108,
  451. };
  452. /*
  453. * (microMIPS) POOL32F secondary minor opcodes.
  454. */
  455. enum mm_32f_40_minor_op {
  456. mm_fmovf_op,
  457. mm_fmovt_op,
  458. };
  459. /*
  460. * (microMIPS) POOL32F secondary minor opcodes.
  461. */
  462. enum mm_32f_60_minor_op {
  463. mm_fadd_op,
  464. mm_fsub_op,
  465. mm_fmul_op,
  466. mm_fdiv_op,
  467. };
  468. /*
  469. * (microMIPS) POOL32F secondary minor opcodes.
  470. */
  471. enum mm_32f_70_minor_op {
  472. mm_fmovn_op,
  473. mm_fmovz_op,
  474. };
  475. /*
  476. * (microMIPS) POOL32FXF secondary minor opcodes for POOL32F.
  477. */
  478. enum mm_32f_73_minor_op {
  479. mm_fmov0_op = 0x01,
  480. mm_fcvtl_op = 0x04,
  481. mm_movf0_op = 0x05,
  482. mm_frsqrt_op = 0x08,
  483. mm_ffloorl_op = 0x0c,
  484. mm_fabs0_op = 0x0d,
  485. mm_fcvtw_op = 0x24,
  486. mm_movt0_op = 0x25,
  487. mm_fsqrt_op = 0x28,
  488. mm_ffloorw_op = 0x2c,
  489. mm_fneg0_op = 0x2d,
  490. mm_cfc1_op = 0x40,
  491. mm_frecip_op = 0x48,
  492. mm_fceill_op = 0x4c,
  493. mm_fcvtd0_op = 0x4d,
  494. mm_ctc1_op = 0x60,
  495. mm_fceilw_op = 0x6c,
  496. mm_fcvts0_op = 0x6d,
  497. mm_mfc1_op = 0x80,
  498. mm_fmov1_op = 0x81,
  499. mm_movf1_op = 0x85,
  500. mm_ftruncl_op = 0x8c,
  501. mm_fabs1_op = 0x8d,
  502. mm_mtc1_op = 0xa0,
  503. mm_movt1_op = 0xa5,
  504. mm_ftruncw_op = 0xac,
  505. mm_fneg1_op = 0xad,
  506. mm_mfhc1_op = 0xc0,
  507. mm_froundl_op = 0xcc,
  508. mm_fcvtd1_op = 0xcd,
  509. mm_mthc1_op = 0xe0,
  510. mm_froundw_op = 0xec,
  511. mm_fcvts1_op = 0xed,
  512. };
  513. /*
  514. * (microMIPS) POOL32S minor opcodes.
  515. */
  516. enum mm_32s_minor_op {
  517. mm_32s_elm_op = 0x16,
  518. };
  519. /*
  520. * (microMIPS) POOL16C minor opcodes.
  521. */
  522. enum mm_16c_minor_op {
  523. mm_lwm16_op = 0x04,
  524. mm_swm16_op = 0x05,
  525. mm_jr16_op = 0x0c,
  526. mm_jrc_op = 0x0d,
  527. mm_jalr16_op = 0x0e,
  528. mm_jalrs16_op = 0x0f,
  529. mm_jraddiusp_op = 0x18,
  530. };
  531. /*
  532. * (microMIPS) POOL16D minor opcodes.
  533. */
  534. enum mm_16d_minor_op {
  535. mm_addius5_func,
  536. mm_addiusp_func,
  537. };
  538. /*
  539. * (MIPS16e) opcodes.
  540. */
  541. enum MIPS16e_ops {
  542. MIPS16e_jal_op = 003,
  543. MIPS16e_ld_op = 007,
  544. MIPS16e_i8_op = 014,
  545. MIPS16e_sd_op = 017,
  546. MIPS16e_lb_op = 020,
  547. MIPS16e_lh_op = 021,
  548. MIPS16e_lwsp_op = 022,
  549. MIPS16e_lw_op = 023,
  550. MIPS16e_lbu_op = 024,
  551. MIPS16e_lhu_op = 025,
  552. MIPS16e_lwpc_op = 026,
  553. MIPS16e_lwu_op = 027,
  554. MIPS16e_sb_op = 030,
  555. MIPS16e_sh_op = 031,
  556. MIPS16e_swsp_op = 032,
  557. MIPS16e_sw_op = 033,
  558. MIPS16e_rr_op = 035,
  559. MIPS16e_extend_op = 036,
  560. MIPS16e_i64_op = 037,
  561. };
  562. enum MIPS16e_i64_func {
  563. MIPS16e_ldsp_func,
  564. MIPS16e_sdsp_func,
  565. MIPS16e_sdrasp_func,
  566. MIPS16e_dadjsp_func,
  567. MIPS16e_ldpc_func,
  568. };
  569. enum MIPS16e_rr_func {
  570. MIPS16e_jr_func,
  571. };
  572. enum MIPS6e_i8_func {
  573. MIPS16e_swrasp_func = 02,
  574. };
  575. /*
  576. * (microMIPS) NOP instruction.
  577. */
  578. #define MM_NOP16 0x0c00
  579. struct j_format {
  580. __BITFIELD_FIELD(unsigned int opcode : 6, /* Jump format */
  581. __BITFIELD_FIELD(unsigned int target : 26,
  582. ;))
  583. };
  584. struct i_format { /* signed immediate format */
  585. __BITFIELD_FIELD(unsigned int opcode : 6,
  586. __BITFIELD_FIELD(unsigned int rs : 5,
  587. __BITFIELD_FIELD(unsigned int rt : 5,
  588. __BITFIELD_FIELD(signed int simmediate : 16,
  589. ;))))
  590. };
  591. struct u_format { /* unsigned immediate format */
  592. __BITFIELD_FIELD(unsigned int opcode : 6,
  593. __BITFIELD_FIELD(unsigned int rs : 5,
  594. __BITFIELD_FIELD(unsigned int rt : 5,
  595. __BITFIELD_FIELD(unsigned int uimmediate : 16,
  596. ;))))
  597. };
  598. struct c_format { /* Cache (>= R6000) format */
  599. __BITFIELD_FIELD(unsigned int opcode : 6,
  600. __BITFIELD_FIELD(unsigned int rs : 5,
  601. __BITFIELD_FIELD(unsigned int c_op : 3,
  602. __BITFIELD_FIELD(unsigned int cache : 2,
  603. __BITFIELD_FIELD(unsigned int simmediate : 16,
  604. ;)))))
  605. };
  606. struct r_format { /* Register format */
  607. __BITFIELD_FIELD(unsigned int opcode : 6,
  608. __BITFIELD_FIELD(unsigned int rs : 5,
  609. __BITFIELD_FIELD(unsigned int rt : 5,
  610. __BITFIELD_FIELD(unsigned int rd : 5,
  611. __BITFIELD_FIELD(unsigned int re : 5,
  612. __BITFIELD_FIELD(unsigned int func : 6,
  613. ;))))))
  614. };
  615. struct c0r_format { /* C0 register format */
  616. __BITFIELD_FIELD(unsigned int opcode : 6,
  617. __BITFIELD_FIELD(unsigned int rs : 5,
  618. __BITFIELD_FIELD(unsigned int rt : 5,
  619. __BITFIELD_FIELD(unsigned int rd : 5,
  620. __BITFIELD_FIELD(unsigned int z: 8,
  621. __BITFIELD_FIELD(unsigned int sel : 3,
  622. ;))))))
  623. };
  624. struct mfmc0_format { /* MFMC0 register format */
  625. __BITFIELD_FIELD(unsigned int opcode : 6,
  626. __BITFIELD_FIELD(unsigned int rs : 5,
  627. __BITFIELD_FIELD(unsigned int rt : 5,
  628. __BITFIELD_FIELD(unsigned int rd : 5,
  629. __BITFIELD_FIELD(unsigned int re : 5,
  630. __BITFIELD_FIELD(unsigned int sc : 1,
  631. __BITFIELD_FIELD(unsigned int : 2,
  632. __BITFIELD_FIELD(unsigned int sel : 3,
  633. ;))))))))
  634. };
  635. struct co_format { /* C0 CO format */
  636. __BITFIELD_FIELD(unsigned int opcode : 6,
  637. __BITFIELD_FIELD(unsigned int co : 1,
  638. __BITFIELD_FIELD(unsigned int code : 19,
  639. __BITFIELD_FIELD(unsigned int func : 6,
  640. ;))))
  641. };
  642. struct p_format { /* Performance counter format (R10000) */
  643. __BITFIELD_FIELD(unsigned int opcode : 6,
  644. __BITFIELD_FIELD(unsigned int rs : 5,
  645. __BITFIELD_FIELD(unsigned int rt : 5,
  646. __BITFIELD_FIELD(unsigned int rd : 5,
  647. __BITFIELD_FIELD(unsigned int re : 5,
  648. __BITFIELD_FIELD(unsigned int func : 6,
  649. ;))))))
  650. };
  651. struct f_format { /* FPU register format */
  652. __BITFIELD_FIELD(unsigned int opcode : 6,
  653. __BITFIELD_FIELD(unsigned int : 1,
  654. __BITFIELD_FIELD(unsigned int fmt : 4,
  655. __BITFIELD_FIELD(unsigned int rt : 5,
  656. __BITFIELD_FIELD(unsigned int rd : 5,
  657. __BITFIELD_FIELD(unsigned int re : 5,
  658. __BITFIELD_FIELD(unsigned int func : 6,
  659. ;)))))))
  660. };
  661. struct ma_format { /* FPU multiply and add format (MIPS IV) */
  662. __BITFIELD_FIELD(unsigned int opcode : 6,
  663. __BITFIELD_FIELD(unsigned int fr : 5,
  664. __BITFIELD_FIELD(unsigned int ft : 5,
  665. __BITFIELD_FIELD(unsigned int fs : 5,
  666. __BITFIELD_FIELD(unsigned int fd : 5,
  667. __BITFIELD_FIELD(unsigned int func : 4,
  668. __BITFIELD_FIELD(unsigned int fmt : 2,
  669. ;)))))))
  670. };
  671. struct b_format { /* BREAK and SYSCALL */
  672. __BITFIELD_FIELD(unsigned int opcode : 6,
  673. __BITFIELD_FIELD(unsigned int code : 20,
  674. __BITFIELD_FIELD(unsigned int func : 6,
  675. ;)))
  676. };
  677. struct ps_format { /* MIPS-3D / paired single format */
  678. __BITFIELD_FIELD(unsigned int opcode : 6,
  679. __BITFIELD_FIELD(unsigned int rs : 5,
  680. __BITFIELD_FIELD(unsigned int ft : 5,
  681. __BITFIELD_FIELD(unsigned int fs : 5,
  682. __BITFIELD_FIELD(unsigned int fd : 5,
  683. __BITFIELD_FIELD(unsigned int func : 6,
  684. ;))))))
  685. };
  686. struct v_format { /* MDMX vector format */
  687. __BITFIELD_FIELD(unsigned int opcode : 6,
  688. __BITFIELD_FIELD(unsigned int sel : 4,
  689. __BITFIELD_FIELD(unsigned int fmt : 1,
  690. __BITFIELD_FIELD(unsigned int vt : 5,
  691. __BITFIELD_FIELD(unsigned int vs : 5,
  692. __BITFIELD_FIELD(unsigned int vd : 5,
  693. __BITFIELD_FIELD(unsigned int func : 6,
  694. ;)))))))
  695. };
  696. struct msa_mi10_format { /* MSA MI10 */
  697. __BITFIELD_FIELD(unsigned int opcode : 6,
  698. __BITFIELD_FIELD(signed int s10 : 10,
  699. __BITFIELD_FIELD(unsigned int rs : 5,
  700. __BITFIELD_FIELD(unsigned int wd : 5,
  701. __BITFIELD_FIELD(unsigned int func : 4,
  702. __BITFIELD_FIELD(unsigned int df : 2,
  703. ;))))))
  704. };
  705. struct dsp_format { /* SPEC3 DSP format instructions */
  706. __BITFIELD_FIELD(unsigned int opcode : 6,
  707. __BITFIELD_FIELD(unsigned int base : 5,
  708. __BITFIELD_FIELD(unsigned int index : 5,
  709. __BITFIELD_FIELD(unsigned int rd : 5,
  710. __BITFIELD_FIELD(unsigned int op : 5,
  711. __BITFIELD_FIELD(unsigned int func : 6,
  712. ;))))))
  713. };
  714. struct spec3_format { /* SPEC3 */
  715. __BITFIELD_FIELD(unsigned int opcode:6,
  716. __BITFIELD_FIELD(unsigned int rs:5,
  717. __BITFIELD_FIELD(unsigned int rt:5,
  718. __BITFIELD_FIELD(signed int simmediate:9,
  719. __BITFIELD_FIELD(unsigned int func:7,
  720. ;)))))
  721. };
  722. /*
  723. * microMIPS instruction formats (32-bit length)
  724. *
  725. * NOTE:
  726. * Parenthesis denote whether the format is a microMIPS instruction or
  727. * if it is MIPS32 instruction re-encoded for use in the microMIPS ASE.
  728. */
  729. struct fb_format { /* FPU branch format (MIPS32) */
  730. __BITFIELD_FIELD(unsigned int opcode : 6,
  731. __BITFIELD_FIELD(unsigned int bc : 5,
  732. __BITFIELD_FIELD(unsigned int cc : 3,
  733. __BITFIELD_FIELD(unsigned int flag : 2,
  734. __BITFIELD_FIELD(signed int simmediate : 16,
  735. ;)))))
  736. };
  737. struct fp0_format { /* FPU multiply and add format (MIPS32) */
  738. __BITFIELD_FIELD(unsigned int opcode : 6,
  739. __BITFIELD_FIELD(unsigned int fmt : 5,
  740. __BITFIELD_FIELD(unsigned int ft : 5,
  741. __BITFIELD_FIELD(unsigned int fs : 5,
  742. __BITFIELD_FIELD(unsigned int fd : 5,
  743. __BITFIELD_FIELD(unsigned int func : 6,
  744. ;))))))
  745. };
  746. struct mm_fp0_format { /* FPU multiply and add format (microMIPS) */
  747. __BITFIELD_FIELD(unsigned int opcode : 6,
  748. __BITFIELD_FIELD(unsigned int ft : 5,
  749. __BITFIELD_FIELD(unsigned int fs : 5,
  750. __BITFIELD_FIELD(unsigned int fd : 5,
  751. __BITFIELD_FIELD(unsigned int fmt : 3,
  752. __BITFIELD_FIELD(unsigned int op : 2,
  753. __BITFIELD_FIELD(unsigned int func : 6,
  754. ;)))))))
  755. };
  756. struct fp1_format { /* FPU mfc1 and cfc1 format (MIPS32) */
  757. __BITFIELD_FIELD(unsigned int opcode : 6,
  758. __BITFIELD_FIELD(unsigned int op : 5,
  759. __BITFIELD_FIELD(unsigned int rt : 5,
  760. __BITFIELD_FIELD(unsigned int fs : 5,
  761. __BITFIELD_FIELD(unsigned int fd : 5,
  762. __BITFIELD_FIELD(unsigned int func : 6,
  763. ;))))))
  764. };
  765. struct mm_fp1_format { /* FPU mfc1 and cfc1 format (microMIPS) */
  766. __BITFIELD_FIELD(unsigned int opcode : 6,
  767. __BITFIELD_FIELD(unsigned int rt : 5,
  768. __BITFIELD_FIELD(unsigned int fs : 5,
  769. __BITFIELD_FIELD(unsigned int fmt : 2,
  770. __BITFIELD_FIELD(unsigned int op : 8,
  771. __BITFIELD_FIELD(unsigned int func : 6,
  772. ;))))))
  773. };
  774. struct mm_fp2_format { /* FPU movt and movf format (microMIPS) */
  775. __BITFIELD_FIELD(unsigned int opcode : 6,
  776. __BITFIELD_FIELD(unsigned int fd : 5,
  777. __BITFIELD_FIELD(unsigned int fs : 5,
  778. __BITFIELD_FIELD(unsigned int cc : 3,
  779. __BITFIELD_FIELD(unsigned int zero : 2,
  780. __BITFIELD_FIELD(unsigned int fmt : 2,
  781. __BITFIELD_FIELD(unsigned int op : 3,
  782. __BITFIELD_FIELD(unsigned int func : 6,
  783. ;))))))))
  784. };
  785. struct mm_fp3_format { /* FPU abs and neg format (microMIPS) */
  786. __BITFIELD_FIELD(unsigned int opcode : 6,
  787. __BITFIELD_FIELD(unsigned int rt : 5,
  788. __BITFIELD_FIELD(unsigned int fs : 5,
  789. __BITFIELD_FIELD(unsigned int fmt : 3,
  790. __BITFIELD_FIELD(unsigned int op : 7,
  791. __BITFIELD_FIELD(unsigned int func : 6,
  792. ;))))))
  793. };
  794. struct mm_fp4_format { /* FPU c.cond format (microMIPS) */
  795. __BITFIELD_FIELD(unsigned int opcode : 6,
  796. __BITFIELD_FIELD(unsigned int rt : 5,
  797. __BITFIELD_FIELD(unsigned int fs : 5,
  798. __BITFIELD_FIELD(unsigned int cc : 3,
  799. __BITFIELD_FIELD(unsigned int fmt : 3,
  800. __BITFIELD_FIELD(unsigned int cond : 4,
  801. __BITFIELD_FIELD(unsigned int func : 6,
  802. ;)))))))
  803. };
  804. struct mm_fp5_format { /* FPU lwxc1 and swxc1 format (microMIPS) */
  805. __BITFIELD_FIELD(unsigned int opcode : 6,
  806. __BITFIELD_FIELD(unsigned int index : 5,
  807. __BITFIELD_FIELD(unsigned int base : 5,
  808. __BITFIELD_FIELD(unsigned int fd : 5,
  809. __BITFIELD_FIELD(unsigned int op : 5,
  810. __BITFIELD_FIELD(unsigned int func : 6,
  811. ;))))))
  812. };
  813. struct fp6_format { /* FPU madd and msub format (MIPS IV) */
  814. __BITFIELD_FIELD(unsigned int opcode : 6,
  815. __BITFIELD_FIELD(unsigned int fr : 5,
  816. __BITFIELD_FIELD(unsigned int ft : 5,
  817. __BITFIELD_FIELD(unsigned int fs : 5,
  818. __BITFIELD_FIELD(unsigned int fd : 5,
  819. __BITFIELD_FIELD(unsigned int func : 6,
  820. ;))))))
  821. };
  822. struct mm_fp6_format { /* FPU madd and msub format (microMIPS) */
  823. __BITFIELD_FIELD(unsigned int opcode : 6,
  824. __BITFIELD_FIELD(unsigned int ft : 5,
  825. __BITFIELD_FIELD(unsigned int fs : 5,
  826. __BITFIELD_FIELD(unsigned int fd : 5,
  827. __BITFIELD_FIELD(unsigned int fr : 5,
  828. __BITFIELD_FIELD(unsigned int func : 6,
  829. ;))))))
  830. };
  831. struct mm_i_format { /* Immediate format (microMIPS) */
  832. __BITFIELD_FIELD(unsigned int opcode : 6,
  833. __BITFIELD_FIELD(unsigned int rt : 5,
  834. __BITFIELD_FIELD(unsigned int rs : 5,
  835. __BITFIELD_FIELD(signed int simmediate : 16,
  836. ;))))
  837. };
  838. struct mm_m_format { /* Multi-word load/store format (microMIPS) */
  839. __BITFIELD_FIELD(unsigned int opcode : 6,
  840. __BITFIELD_FIELD(unsigned int rd : 5,
  841. __BITFIELD_FIELD(unsigned int base : 5,
  842. __BITFIELD_FIELD(unsigned int func : 4,
  843. __BITFIELD_FIELD(signed int simmediate : 12,
  844. ;)))))
  845. };
  846. struct mm_x_format { /* Scaled indexed load format (microMIPS) */
  847. __BITFIELD_FIELD(unsigned int opcode : 6,
  848. __BITFIELD_FIELD(unsigned int index : 5,
  849. __BITFIELD_FIELD(unsigned int base : 5,
  850. __BITFIELD_FIELD(unsigned int rd : 5,
  851. __BITFIELD_FIELD(unsigned int func : 11,
  852. ;)))))
  853. };
  854. struct mm_a_format { /* ADDIUPC format (microMIPS) */
  855. __BITFIELD_FIELD(unsigned int opcode : 6,
  856. __BITFIELD_FIELD(unsigned int rs : 3,
  857. __BITFIELD_FIELD(signed int simmediate : 23,
  858. ;)))
  859. };
  860. /*
  861. * microMIPS instruction formats (16-bit length)
  862. */
  863. struct mm_b0_format { /* Unconditional branch format (microMIPS) */
  864. __BITFIELD_FIELD(unsigned int opcode : 6,
  865. __BITFIELD_FIELD(signed int simmediate : 10,
  866. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  867. ;)))
  868. };
  869. struct mm_b1_format { /* Conditional branch format (microMIPS) */
  870. __BITFIELD_FIELD(unsigned int opcode : 6,
  871. __BITFIELD_FIELD(unsigned int rs : 3,
  872. __BITFIELD_FIELD(signed int simmediate : 7,
  873. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  874. ;))))
  875. };
  876. struct mm16_m_format { /* Multi-word load/store format */
  877. __BITFIELD_FIELD(unsigned int opcode : 6,
  878. __BITFIELD_FIELD(unsigned int func : 4,
  879. __BITFIELD_FIELD(unsigned int rlist : 2,
  880. __BITFIELD_FIELD(unsigned int imm : 4,
  881. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  882. ;)))))
  883. };
  884. struct mm16_rb_format { /* Signed immediate format */
  885. __BITFIELD_FIELD(unsigned int opcode : 6,
  886. __BITFIELD_FIELD(unsigned int rt : 3,
  887. __BITFIELD_FIELD(unsigned int base : 3,
  888. __BITFIELD_FIELD(signed int simmediate : 4,
  889. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  890. ;)))))
  891. };
  892. struct mm16_r3_format { /* Load from global pointer format */
  893. __BITFIELD_FIELD(unsigned int opcode : 6,
  894. __BITFIELD_FIELD(unsigned int rt : 3,
  895. __BITFIELD_FIELD(signed int simmediate : 7,
  896. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  897. ;))))
  898. };
  899. struct mm16_r5_format { /* Load/store from stack pointer format */
  900. __BITFIELD_FIELD(unsigned int opcode : 6,
  901. __BITFIELD_FIELD(unsigned int rt : 5,
  902. __BITFIELD_FIELD(unsigned int imm : 5,
  903. __BITFIELD_FIELD(unsigned int : 16, /* Ignored */
  904. ;))))
  905. };
  906. /*
  907. * MIPS16e instruction formats (16-bit length)
  908. */
  909. struct m16e_rr {
  910. __BITFIELD_FIELD(unsigned int opcode : 5,
  911. __BITFIELD_FIELD(unsigned int rx : 3,
  912. __BITFIELD_FIELD(unsigned int nd : 1,
  913. __BITFIELD_FIELD(unsigned int l : 1,
  914. __BITFIELD_FIELD(unsigned int ra : 1,
  915. __BITFIELD_FIELD(unsigned int func : 5,
  916. ;))))))
  917. };
  918. struct m16e_jal {
  919. __BITFIELD_FIELD(unsigned int opcode : 5,
  920. __BITFIELD_FIELD(unsigned int x : 1,
  921. __BITFIELD_FIELD(unsigned int imm20_16 : 5,
  922. __BITFIELD_FIELD(signed int imm25_21 : 5,
  923. ;))))
  924. };
  925. struct m16e_i64 {
  926. __BITFIELD_FIELD(unsigned int opcode : 5,
  927. __BITFIELD_FIELD(unsigned int func : 3,
  928. __BITFIELD_FIELD(unsigned int imm : 8,
  929. ;)))
  930. };
  931. struct m16e_ri64 {
  932. __BITFIELD_FIELD(unsigned int opcode : 5,
  933. __BITFIELD_FIELD(unsigned int func : 3,
  934. __BITFIELD_FIELD(unsigned int ry : 3,
  935. __BITFIELD_FIELD(unsigned int imm : 5,
  936. ;))))
  937. };
  938. struct m16e_ri {
  939. __BITFIELD_FIELD(unsigned int opcode : 5,
  940. __BITFIELD_FIELD(unsigned int rx : 3,
  941. __BITFIELD_FIELD(unsigned int imm : 8,
  942. ;)))
  943. };
  944. struct m16e_rri {
  945. __BITFIELD_FIELD(unsigned int opcode : 5,
  946. __BITFIELD_FIELD(unsigned int rx : 3,
  947. __BITFIELD_FIELD(unsigned int ry : 3,
  948. __BITFIELD_FIELD(unsigned int imm : 5,
  949. ;))))
  950. };
  951. struct m16e_i8 {
  952. __BITFIELD_FIELD(unsigned int opcode : 5,
  953. __BITFIELD_FIELD(unsigned int func : 3,
  954. __BITFIELD_FIELD(unsigned int imm : 8,
  955. ;)))
  956. };
  957. union mips_instruction {
  958. unsigned int word;
  959. unsigned short halfword[2];
  960. unsigned char byte[4];
  961. struct j_format j_format;
  962. struct i_format i_format;
  963. struct u_format u_format;
  964. struct c_format c_format;
  965. struct r_format r_format;
  966. struct c0r_format c0r_format;
  967. struct mfmc0_format mfmc0_format;
  968. struct co_format co_format;
  969. struct p_format p_format;
  970. struct f_format f_format;
  971. struct ma_format ma_format;
  972. struct msa_mi10_format msa_mi10_format;
  973. struct b_format b_format;
  974. struct ps_format ps_format;
  975. struct v_format v_format;
  976. struct dsp_format dsp_format;
  977. struct spec3_format spec3_format;
  978. struct fb_format fb_format;
  979. struct fp0_format fp0_format;
  980. struct mm_fp0_format mm_fp0_format;
  981. struct fp1_format fp1_format;
  982. struct mm_fp1_format mm_fp1_format;
  983. struct mm_fp2_format mm_fp2_format;
  984. struct mm_fp3_format mm_fp3_format;
  985. struct mm_fp4_format mm_fp4_format;
  986. struct mm_fp5_format mm_fp5_format;
  987. struct fp6_format fp6_format;
  988. struct mm_fp6_format mm_fp6_format;
  989. struct mm_i_format mm_i_format;
  990. struct mm_m_format mm_m_format;
  991. struct mm_x_format mm_x_format;
  992. struct mm_a_format mm_a_format;
  993. struct mm_b0_format mm_b0_format;
  994. struct mm_b1_format mm_b1_format;
  995. struct mm16_m_format mm16_m_format ;
  996. struct mm16_rb_format mm16_rb_format;
  997. struct mm16_r3_format mm16_r3_format;
  998. struct mm16_r5_format mm16_r5_format;
  999. };
  1000. union mips16e_instruction {
  1001. unsigned int full : 16;
  1002. struct m16e_rr rr;
  1003. struct m16e_jal jal;
  1004. struct m16e_i64 i64;
  1005. struct m16e_ri64 ri64;
  1006. struct m16e_ri ri;
  1007. struct m16e_rri rri;
  1008. struct m16e_i8 i8;
  1009. };
  1010. #endif /* _UAPI_ASM_INST_H */