inst.h 27 KB

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