122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _ASM_INST_H
2022851890Sopenharmony_ci#define _ASM_INST_H
2122851890Sopenharmony_ci#include <asm/bitfield.h>
2222851890Sopenharmony_cienum major_op {
2322851890Sopenharmony_ci  spec_op,
2422851890Sopenharmony_ci  bcond_op,
2522851890Sopenharmony_ci  j_op,
2622851890Sopenharmony_ci  jal_op,
2722851890Sopenharmony_ci  beq_op,
2822851890Sopenharmony_ci  bne_op,
2922851890Sopenharmony_ci  blez_op,
3022851890Sopenharmony_ci  bgtz_op,
3122851890Sopenharmony_ci  addi_op,
3222851890Sopenharmony_ci  pop10_op = addi_op,
3322851890Sopenharmony_ci  addiu_op,
3422851890Sopenharmony_ci  slti_op,
3522851890Sopenharmony_ci  sltiu_op,
3622851890Sopenharmony_ci  andi_op,
3722851890Sopenharmony_ci  ori_op,
3822851890Sopenharmony_ci  xori_op,
3922851890Sopenharmony_ci  lui_op,
4022851890Sopenharmony_ci  cop0_op,
4122851890Sopenharmony_ci  cop1_op,
4222851890Sopenharmony_ci  cop2_op,
4322851890Sopenharmony_ci  cop1x_op,
4422851890Sopenharmony_ci  beql_op,
4522851890Sopenharmony_ci  bnel_op,
4622851890Sopenharmony_ci  blezl_op,
4722851890Sopenharmony_ci  bgtzl_op,
4822851890Sopenharmony_ci  daddi_op,
4922851890Sopenharmony_ci  pop30_op = daddi_op,
5022851890Sopenharmony_ci  daddiu_op,
5122851890Sopenharmony_ci  ldl_op,
5222851890Sopenharmony_ci  ldr_op,
5322851890Sopenharmony_ci  spec2_op,
5422851890Sopenharmony_ci  jalx_op,
5522851890Sopenharmony_ci  mdmx_op,
5622851890Sopenharmony_ci  msa_op = mdmx_op,
5722851890Sopenharmony_ci  spec3_op,
5822851890Sopenharmony_ci  lb_op,
5922851890Sopenharmony_ci  lh_op,
6022851890Sopenharmony_ci  lwl_op,
6122851890Sopenharmony_ci  lw_op,
6222851890Sopenharmony_ci  lbu_op,
6322851890Sopenharmony_ci  lhu_op,
6422851890Sopenharmony_ci  lwr_op,
6522851890Sopenharmony_ci  lwu_op,
6622851890Sopenharmony_ci  sb_op,
6722851890Sopenharmony_ci  sh_op,
6822851890Sopenharmony_ci  swl_op,
6922851890Sopenharmony_ci  sw_op,
7022851890Sopenharmony_ci  sdl_op,
7122851890Sopenharmony_ci  sdr_op,
7222851890Sopenharmony_ci  swr_op,
7322851890Sopenharmony_ci  cache_op,
7422851890Sopenharmony_ci  ll_op,
7522851890Sopenharmony_ci  lwc1_op,
7622851890Sopenharmony_ci  lwc2_op,
7722851890Sopenharmony_ci  bc6_op = lwc2_op,
7822851890Sopenharmony_ci  pref_op,
7922851890Sopenharmony_ci  lld_op,
8022851890Sopenharmony_ci  ldc1_op,
8122851890Sopenharmony_ci  ldc2_op,
8222851890Sopenharmony_ci  pop66_op = ldc2_op,
8322851890Sopenharmony_ci  ld_op,
8422851890Sopenharmony_ci  sc_op,
8522851890Sopenharmony_ci  swc1_op,
8622851890Sopenharmony_ci  swc2_op,
8722851890Sopenharmony_ci  balc6_op = swc2_op,
8822851890Sopenharmony_ci  major_3b_op,
8922851890Sopenharmony_ci  scd_op,
9022851890Sopenharmony_ci  sdc1_op,
9122851890Sopenharmony_ci  sdc2_op,
9222851890Sopenharmony_ci  pop76_op = sdc2_op,
9322851890Sopenharmony_ci  sd_op
9422851890Sopenharmony_ci};
9522851890Sopenharmony_cienum spec_op {
9622851890Sopenharmony_ci  sll_op,
9722851890Sopenharmony_ci  movc_op,
9822851890Sopenharmony_ci  srl_op,
9922851890Sopenharmony_ci  sra_op,
10022851890Sopenharmony_ci  sllv_op,
10122851890Sopenharmony_ci  pmon_op,
10222851890Sopenharmony_ci  srlv_op,
10322851890Sopenharmony_ci  srav_op,
10422851890Sopenharmony_ci  jr_op,
10522851890Sopenharmony_ci  jalr_op,
10622851890Sopenharmony_ci  movz_op,
10722851890Sopenharmony_ci  movn_op,
10822851890Sopenharmony_ci  syscall_op,
10922851890Sopenharmony_ci  break_op,
11022851890Sopenharmony_ci  spim_op,
11122851890Sopenharmony_ci  sync_op,
11222851890Sopenharmony_ci  mfhi_op,
11322851890Sopenharmony_ci  mthi_op,
11422851890Sopenharmony_ci  mflo_op,
11522851890Sopenharmony_ci  mtlo_op,
11622851890Sopenharmony_ci  dsllv_op,
11722851890Sopenharmony_ci  spec2_unused_op,
11822851890Sopenharmony_ci  dsrlv_op,
11922851890Sopenharmony_ci  dsrav_op,
12022851890Sopenharmony_ci  mult_op,
12122851890Sopenharmony_ci  multu_op,
12222851890Sopenharmony_ci  div_op,
12322851890Sopenharmony_ci  divu_op,
12422851890Sopenharmony_ci  dmult_op,
12522851890Sopenharmony_ci  dmultu_op,
12622851890Sopenharmony_ci  ddiv_op,
12722851890Sopenharmony_ci  ddivu_op,
12822851890Sopenharmony_ci  add_op,
12922851890Sopenharmony_ci  addu_op,
13022851890Sopenharmony_ci  sub_op,
13122851890Sopenharmony_ci  subu_op,
13222851890Sopenharmony_ci  and_op,
13322851890Sopenharmony_ci  or_op,
13422851890Sopenharmony_ci  xor_op,
13522851890Sopenharmony_ci  nor_op,
13622851890Sopenharmony_ci  spec3_unused_op,
13722851890Sopenharmony_ci  spec4_unused_op,
13822851890Sopenharmony_ci  slt_op,
13922851890Sopenharmony_ci  sltu_op,
14022851890Sopenharmony_ci  dadd_op,
14122851890Sopenharmony_ci  daddu_op,
14222851890Sopenharmony_ci  dsub_op,
14322851890Sopenharmony_ci  dsubu_op,
14422851890Sopenharmony_ci  tge_op,
14522851890Sopenharmony_ci  tgeu_op,
14622851890Sopenharmony_ci  tlt_op,
14722851890Sopenharmony_ci  tltu_op,
14822851890Sopenharmony_ci  teq_op,
14922851890Sopenharmony_ci  seleqz_op,
15022851890Sopenharmony_ci  tne_op,
15122851890Sopenharmony_ci  selnez_op,
15222851890Sopenharmony_ci  dsll_op,
15322851890Sopenharmony_ci  spec5_unused_op,
15422851890Sopenharmony_ci  dsrl_op,
15522851890Sopenharmony_ci  dsra_op,
15622851890Sopenharmony_ci  dsll32_op,
15722851890Sopenharmony_ci  spec6_unused_op,
15822851890Sopenharmony_ci  dsrl32_op,
15922851890Sopenharmony_ci  dsra32_op
16022851890Sopenharmony_ci};
16122851890Sopenharmony_cienum spec2_op {
16222851890Sopenharmony_ci  madd_op,
16322851890Sopenharmony_ci  maddu_op,
16422851890Sopenharmony_ci  mul_op,
16522851890Sopenharmony_ci  spec2_3_unused_op,
16622851890Sopenharmony_ci  msub_op,
16722851890Sopenharmony_ci  msubu_op,
16822851890Sopenharmony_ci  clz_op = 0x20,
16922851890Sopenharmony_ci  clo_op,
17022851890Sopenharmony_ci  dclz_op = 0x24,
17122851890Sopenharmony_ci  dclo_op,
17222851890Sopenharmony_ci  sdbpp_op = 0x3f
17322851890Sopenharmony_ci};
17422851890Sopenharmony_cienum spec3_op {
17522851890Sopenharmony_ci  ext_op,
17622851890Sopenharmony_ci  dextm_op,
17722851890Sopenharmony_ci  dextu_op,
17822851890Sopenharmony_ci  dext_op,
17922851890Sopenharmony_ci  ins_op,
18022851890Sopenharmony_ci  dinsm_op,
18122851890Sopenharmony_ci  dinsu_op,
18222851890Sopenharmony_ci  dins_op,
18322851890Sopenharmony_ci  yield_op = 0x09,
18422851890Sopenharmony_ci  lx_op = 0x0a,
18522851890Sopenharmony_ci  lwle_op = 0x19,
18622851890Sopenharmony_ci  lwre_op = 0x1a,
18722851890Sopenharmony_ci  cachee_op = 0x1b,
18822851890Sopenharmony_ci  sbe_op = 0x1c,
18922851890Sopenharmony_ci  she_op = 0x1d,
19022851890Sopenharmony_ci  sce_op = 0x1e,
19122851890Sopenharmony_ci  swe_op = 0x1f,
19222851890Sopenharmony_ci  bshfl_op = 0x20,
19322851890Sopenharmony_ci  swle_op = 0x21,
19422851890Sopenharmony_ci  swre_op = 0x22,
19522851890Sopenharmony_ci  prefe_op = 0x23,
19622851890Sopenharmony_ci  dbshfl_op = 0x24,
19722851890Sopenharmony_ci  cache6_op = 0x25,
19822851890Sopenharmony_ci  sc6_op = 0x26,
19922851890Sopenharmony_ci  scd6_op = 0x27,
20022851890Sopenharmony_ci  lbue_op = 0x28,
20122851890Sopenharmony_ci  lhue_op = 0x29,
20222851890Sopenharmony_ci  lbe_op = 0x2c,
20322851890Sopenharmony_ci  lhe_op = 0x2d,
20422851890Sopenharmony_ci  lle_op = 0x2e,
20522851890Sopenharmony_ci  lwe_op = 0x2f,
20622851890Sopenharmony_ci  pref6_op = 0x35,
20722851890Sopenharmony_ci  ll6_op = 0x36,
20822851890Sopenharmony_ci  lld6_op = 0x37,
20922851890Sopenharmony_ci  rdhwr_op = 0x3b
21022851890Sopenharmony_ci};
21122851890Sopenharmony_cienum mult_op {
21222851890Sopenharmony_ci  mult_mult_op = 0x0,
21322851890Sopenharmony_ci  mult_mul_op = 0x2,
21422851890Sopenharmony_ci  mult_muh_op = 0x3,
21522851890Sopenharmony_ci};
21622851890Sopenharmony_cienum multu_op {
21722851890Sopenharmony_ci  multu_multu_op = 0x0,
21822851890Sopenharmony_ci  multu_mulu_op = 0x2,
21922851890Sopenharmony_ci  multu_muhu_op = 0x3,
22022851890Sopenharmony_ci};
22122851890Sopenharmony_cienum div_op {
22222851890Sopenharmony_ci  div_div_op = 0x0,
22322851890Sopenharmony_ci  div_div6_op = 0x2,
22422851890Sopenharmony_ci  div_mod_op = 0x3,
22522851890Sopenharmony_ci};
22622851890Sopenharmony_cienum divu_op {
22722851890Sopenharmony_ci  divu_divu_op = 0x0,
22822851890Sopenharmony_ci  divu_divu6_op = 0x2,
22922851890Sopenharmony_ci  divu_modu_op = 0x3,
23022851890Sopenharmony_ci};
23122851890Sopenharmony_cienum dmult_op {
23222851890Sopenharmony_ci  dmult_dmult_op = 0x0,
23322851890Sopenharmony_ci  dmult_dmul_op = 0x2,
23422851890Sopenharmony_ci  dmult_dmuh_op = 0x3,
23522851890Sopenharmony_ci};
23622851890Sopenharmony_cienum dmultu_op {
23722851890Sopenharmony_ci  dmultu_dmultu_op = 0x0,
23822851890Sopenharmony_ci  dmultu_dmulu_op = 0x2,
23922851890Sopenharmony_ci  dmultu_dmuhu_op = 0x3,
24022851890Sopenharmony_ci};
24122851890Sopenharmony_cienum ddiv_op {
24222851890Sopenharmony_ci  ddiv_ddiv_op = 0x0,
24322851890Sopenharmony_ci  ddiv_ddiv6_op = 0x2,
24422851890Sopenharmony_ci  ddiv_dmod_op = 0x3,
24522851890Sopenharmony_ci};
24622851890Sopenharmony_cienum ddivu_op {
24722851890Sopenharmony_ci  ddivu_ddivu_op = 0x0,
24822851890Sopenharmony_ci  ddivu_ddivu6_op = 0x2,
24922851890Sopenharmony_ci  ddivu_dmodu_op = 0x3,
25022851890Sopenharmony_ci};
25122851890Sopenharmony_cienum rt_op {
25222851890Sopenharmony_ci  bltz_op,
25322851890Sopenharmony_ci  bgez_op,
25422851890Sopenharmony_ci  bltzl_op,
25522851890Sopenharmony_ci  bgezl_op,
25622851890Sopenharmony_ci  spimi_op,
25722851890Sopenharmony_ci  unused_rt_op_0x05,
25822851890Sopenharmony_ci  unused_rt_op_0x06,
25922851890Sopenharmony_ci  unused_rt_op_0x07,
26022851890Sopenharmony_ci  tgei_op,
26122851890Sopenharmony_ci  tgeiu_op,
26222851890Sopenharmony_ci  tlti_op,
26322851890Sopenharmony_ci  tltiu_op,
26422851890Sopenharmony_ci  teqi_op,
26522851890Sopenharmony_ci  unused_0x0d_rt_op,
26622851890Sopenharmony_ci  tnei_op,
26722851890Sopenharmony_ci  unused_0x0f_rt_op,
26822851890Sopenharmony_ci  bltzal_op,
26922851890Sopenharmony_ci  bgezal_op,
27022851890Sopenharmony_ci  bltzall_op,
27122851890Sopenharmony_ci  bgezall_op,
27222851890Sopenharmony_ci  rt_op_0x14,
27322851890Sopenharmony_ci  rt_op_0x15,
27422851890Sopenharmony_ci  rt_op_0x16,
27522851890Sopenharmony_ci  rt_op_0x17,
27622851890Sopenharmony_ci  rt_op_0x18,
27722851890Sopenharmony_ci  rt_op_0x19,
27822851890Sopenharmony_ci  rt_op_0x1a,
27922851890Sopenharmony_ci  rt_op_0x1b,
28022851890Sopenharmony_ci  bposge32_op,
28122851890Sopenharmony_ci  rt_op_0x1d,
28222851890Sopenharmony_ci  rt_op_0x1e,
28322851890Sopenharmony_ci  synci_op
28422851890Sopenharmony_ci};
28522851890Sopenharmony_cienum cop_op {
28622851890Sopenharmony_ci  mfc_op = 0x00,
28722851890Sopenharmony_ci  dmfc_op = 0x01,
28822851890Sopenharmony_ci  cfc_op = 0x02,
28922851890Sopenharmony_ci  mfhc0_op = 0x02,
29022851890Sopenharmony_ci  mfhc_op = 0x03,
29122851890Sopenharmony_ci  mtc_op = 0x04,
29222851890Sopenharmony_ci  dmtc_op = 0x05,
29322851890Sopenharmony_ci  ctc_op = 0x06,
29422851890Sopenharmony_ci  mthc0_op = 0x06,
29522851890Sopenharmony_ci  mthc_op = 0x07,
29622851890Sopenharmony_ci  bc_op = 0x08,
29722851890Sopenharmony_ci  bc1eqz_op = 0x09,
29822851890Sopenharmony_ci  mfmc0_op = 0x0b,
29922851890Sopenharmony_ci  bc1nez_op = 0x0d,
30022851890Sopenharmony_ci  wrpgpr_op = 0x0e,
30122851890Sopenharmony_ci  cop_op = 0x10,
30222851890Sopenharmony_ci  copm_op = 0x18
30322851890Sopenharmony_ci};
30422851890Sopenharmony_cienum bcop_op {
30522851890Sopenharmony_ci  bcf_op,
30622851890Sopenharmony_ci  bct_op,
30722851890Sopenharmony_ci  bcfl_op,
30822851890Sopenharmony_ci  bctl_op
30922851890Sopenharmony_ci};
31022851890Sopenharmony_cienum cop0_coi_func {
31122851890Sopenharmony_ci  tlbr_op = 0x01,
31222851890Sopenharmony_ci  tlbwi_op = 0x02,
31322851890Sopenharmony_ci  tlbwr_op = 0x06,
31422851890Sopenharmony_ci  tlbp_op = 0x08,
31522851890Sopenharmony_ci  rfe_op = 0x10,
31622851890Sopenharmony_ci  eret_op = 0x18,
31722851890Sopenharmony_ci  wait_op = 0x20,
31822851890Sopenharmony_ci  hypcall_op = 0x28
31922851890Sopenharmony_ci};
32022851890Sopenharmony_cienum cop0_com_func {
32122851890Sopenharmony_ci  tlbr1_op = 0x01,
32222851890Sopenharmony_ci  tlbw_op = 0x02,
32322851890Sopenharmony_ci  tlbp1_op = 0x08,
32422851890Sopenharmony_ci  dctr_op = 0x09,
32522851890Sopenharmony_ci  dctw_op = 0x0a
32622851890Sopenharmony_ci};
32722851890Sopenharmony_cienum cop1_fmt {
32822851890Sopenharmony_ci  s_fmt,
32922851890Sopenharmony_ci  d_fmt,
33022851890Sopenharmony_ci  e_fmt,
33122851890Sopenharmony_ci  q_fmt,
33222851890Sopenharmony_ci  w_fmt,
33322851890Sopenharmony_ci  l_fmt
33422851890Sopenharmony_ci};
33522851890Sopenharmony_cienum cop1_sdw_func {
33622851890Sopenharmony_ci  fadd_op = 0x00,
33722851890Sopenharmony_ci  fsub_op = 0x01,
33822851890Sopenharmony_ci  fmul_op = 0x02,
33922851890Sopenharmony_ci  fdiv_op = 0x03,
34022851890Sopenharmony_ci  fsqrt_op = 0x04,
34122851890Sopenharmony_ci  fabs_op = 0x05,
34222851890Sopenharmony_ci  fmov_op = 0x06,
34322851890Sopenharmony_ci  fneg_op = 0x07,
34422851890Sopenharmony_ci  froundl_op = 0x08,
34522851890Sopenharmony_ci  ftruncl_op = 0x09,
34622851890Sopenharmony_ci  fceill_op = 0x0a,
34722851890Sopenharmony_ci  ffloorl_op = 0x0b,
34822851890Sopenharmony_ci  fround_op = 0x0c,
34922851890Sopenharmony_ci  ftrunc_op = 0x0d,
35022851890Sopenharmony_ci  fceil_op = 0x0e,
35122851890Sopenharmony_ci  ffloor_op = 0x0f,
35222851890Sopenharmony_ci  fsel_op = 0x10,
35322851890Sopenharmony_ci  fmovc_op = 0x11,
35422851890Sopenharmony_ci  fmovz_op = 0x12,
35522851890Sopenharmony_ci  fmovn_op = 0x13,
35622851890Sopenharmony_ci  fseleqz_op = 0x14,
35722851890Sopenharmony_ci  frecip_op = 0x15,
35822851890Sopenharmony_ci  frsqrt_op = 0x16,
35922851890Sopenharmony_ci  fselnez_op = 0x17,
36022851890Sopenharmony_ci  fmaddf_op = 0x18,
36122851890Sopenharmony_ci  fmsubf_op = 0x19,
36222851890Sopenharmony_ci  frint_op = 0x1a,
36322851890Sopenharmony_ci  fclass_op = 0x1b,
36422851890Sopenharmony_ci  fmin_op = 0x1c,
36522851890Sopenharmony_ci  fmina_op = 0x1d,
36622851890Sopenharmony_ci  fmax_op = 0x1e,
36722851890Sopenharmony_ci  fmaxa_op = 0x1f,
36822851890Sopenharmony_ci  fcvts_op = 0x20,
36922851890Sopenharmony_ci  fcvtd_op = 0x21,
37022851890Sopenharmony_ci  fcvte_op = 0x22,
37122851890Sopenharmony_ci  fcvtw_op = 0x24,
37222851890Sopenharmony_ci  fcvtl_op = 0x25,
37322851890Sopenharmony_ci  fcmp_op = 0x30
37422851890Sopenharmony_ci};
37522851890Sopenharmony_cienum cop1x_func {
37622851890Sopenharmony_ci  lwxc1_op = 0x00,
37722851890Sopenharmony_ci  ldxc1_op = 0x01,
37822851890Sopenharmony_ci  swxc1_op = 0x08,
37922851890Sopenharmony_ci  sdxc1_op = 0x09,
38022851890Sopenharmony_ci  pfetch_op = 0x0f,
38122851890Sopenharmony_ci  madd_s_op = 0x20,
38222851890Sopenharmony_ci  madd_d_op = 0x21,
38322851890Sopenharmony_ci  madd_e_op = 0x22,
38422851890Sopenharmony_ci  msub_s_op = 0x28,
38522851890Sopenharmony_ci  msub_d_op = 0x29,
38622851890Sopenharmony_ci  msub_e_op = 0x2a,
38722851890Sopenharmony_ci  nmadd_s_op = 0x30,
38822851890Sopenharmony_ci  nmadd_d_op = 0x31,
38922851890Sopenharmony_ci  nmadd_e_op = 0x32,
39022851890Sopenharmony_ci  nmsub_s_op = 0x38,
39122851890Sopenharmony_ci  nmsub_d_op = 0x39,
39222851890Sopenharmony_ci  nmsub_e_op = 0x3a
39322851890Sopenharmony_ci};
39422851890Sopenharmony_cienum mad_func {
39522851890Sopenharmony_ci  madd_fp_op = 0x08,
39622851890Sopenharmony_ci  msub_fp_op = 0x0a,
39722851890Sopenharmony_ci  nmadd_fp_op = 0x0c,
39822851890Sopenharmony_ci  nmsub_fp_op = 0x0e
39922851890Sopenharmony_ci};
40022851890Sopenharmony_cienum ptw_func {
40122851890Sopenharmony_ci  lwdir_op = 0x00,
40222851890Sopenharmony_ci  lwpte_op = 0x01,
40322851890Sopenharmony_ci  lddir_op = 0x02,
40422851890Sopenharmony_ci  ldpte_op = 0x03,
40522851890Sopenharmony_ci};
40622851890Sopenharmony_cienum lx_func {
40722851890Sopenharmony_ci  lwx_op = 0x00,
40822851890Sopenharmony_ci  lhx_op = 0x04,
40922851890Sopenharmony_ci  lbux_op = 0x06,
41022851890Sopenharmony_ci  ldx_op = 0x08,
41122851890Sopenharmony_ci  lwux_op = 0x10,
41222851890Sopenharmony_ci  lhux_op = 0x14,
41322851890Sopenharmony_ci  lbx_op = 0x16,
41422851890Sopenharmony_ci};
41522851890Sopenharmony_cienum bshfl_func {
41622851890Sopenharmony_ci  wsbh_op = 0x2,
41722851890Sopenharmony_ci  seb_op = 0x10,
41822851890Sopenharmony_ci  seh_op = 0x18,
41922851890Sopenharmony_ci};
42022851890Sopenharmony_cienum dbshfl_func {
42122851890Sopenharmony_ci  dsbh_op = 0x2,
42222851890Sopenharmony_ci  dshd_op = 0x5,
42322851890Sopenharmony_ci};
42422851890Sopenharmony_cienum msa_func {
42522851890Sopenharmony_ci  msa_elm_op = 0x19,
42622851890Sopenharmony_ci};
42722851890Sopenharmony_cienum msa_elm {
42822851890Sopenharmony_ci  msa_ctc_op = 0x3e,
42922851890Sopenharmony_ci  msa_cfc_op = 0x7e,
43022851890Sopenharmony_ci};
43122851890Sopenharmony_cienum msa_mi10_func {
43222851890Sopenharmony_ci  msa_ld_op = 8,
43322851890Sopenharmony_ci  msa_st_op = 9,
43422851890Sopenharmony_ci};
43522851890Sopenharmony_cienum msa_2b_fmt {
43622851890Sopenharmony_ci  msa_fmt_b = 0,
43722851890Sopenharmony_ci  msa_fmt_h = 1,
43822851890Sopenharmony_ci  msa_fmt_w = 2,
43922851890Sopenharmony_ci  msa_fmt_d = 3,
44022851890Sopenharmony_ci};
44122851890Sopenharmony_cienum mm_major_op {
44222851890Sopenharmony_ci  mm_pool32a_op,
44322851890Sopenharmony_ci  mm_pool16a_op,
44422851890Sopenharmony_ci  mm_lbu16_op,
44522851890Sopenharmony_ci  mm_move16_op,
44622851890Sopenharmony_ci  mm_addi32_op,
44722851890Sopenharmony_ci  mm_lbu32_op,
44822851890Sopenharmony_ci  mm_sb32_op,
44922851890Sopenharmony_ci  mm_lb32_op,
45022851890Sopenharmony_ci  mm_pool32b_op,
45122851890Sopenharmony_ci  mm_pool16b_op,
45222851890Sopenharmony_ci  mm_lhu16_op,
45322851890Sopenharmony_ci  mm_andi16_op,
45422851890Sopenharmony_ci  mm_addiu32_op,
45522851890Sopenharmony_ci  mm_lhu32_op,
45622851890Sopenharmony_ci  mm_sh32_op,
45722851890Sopenharmony_ci  mm_lh32_op,
45822851890Sopenharmony_ci  mm_pool32i_op,
45922851890Sopenharmony_ci  mm_pool16c_op,
46022851890Sopenharmony_ci  mm_lwsp16_op,
46122851890Sopenharmony_ci  mm_pool16d_op,
46222851890Sopenharmony_ci  mm_ori32_op,
46322851890Sopenharmony_ci  mm_pool32f_op,
46422851890Sopenharmony_ci  mm_pool32s_op,
46522851890Sopenharmony_ci  mm_reserved2_op,
46622851890Sopenharmony_ci  mm_pool32c_op,
46722851890Sopenharmony_ci  mm_lwgp16_op,
46822851890Sopenharmony_ci  mm_lw16_op,
46922851890Sopenharmony_ci  mm_pool16e_op,
47022851890Sopenharmony_ci  mm_xori32_op,
47122851890Sopenharmony_ci  mm_jals32_op,
47222851890Sopenharmony_ci  mm_addiupc_op,
47322851890Sopenharmony_ci  mm_reserved3_op,
47422851890Sopenharmony_ci  mm_reserved4_op,
47522851890Sopenharmony_ci  mm_pool16f_op,
47622851890Sopenharmony_ci  mm_sb16_op,
47722851890Sopenharmony_ci  mm_beqz16_op,
47822851890Sopenharmony_ci  mm_slti32_op,
47922851890Sopenharmony_ci  mm_beq32_op,
48022851890Sopenharmony_ci  mm_swc132_op,
48122851890Sopenharmony_ci  mm_lwc132_op,
48222851890Sopenharmony_ci  mm_reserved5_op,
48322851890Sopenharmony_ci  mm_reserved6_op,
48422851890Sopenharmony_ci  mm_sh16_op,
48522851890Sopenharmony_ci  mm_bnez16_op,
48622851890Sopenharmony_ci  mm_sltiu32_op,
48722851890Sopenharmony_ci  mm_bne32_op,
48822851890Sopenharmony_ci  mm_sdc132_op,
48922851890Sopenharmony_ci  mm_ldc132_op,
49022851890Sopenharmony_ci  mm_reserved7_op,
49122851890Sopenharmony_ci  mm_reserved8_op,
49222851890Sopenharmony_ci  mm_swsp16_op,
49322851890Sopenharmony_ci  mm_b16_op,
49422851890Sopenharmony_ci  mm_andi32_op,
49522851890Sopenharmony_ci  mm_j32_op,
49622851890Sopenharmony_ci  mm_sd32_op,
49722851890Sopenharmony_ci  mm_ld32_op,
49822851890Sopenharmony_ci  mm_reserved11_op,
49922851890Sopenharmony_ci  mm_reserved12_op,
50022851890Sopenharmony_ci  mm_sw16_op,
50122851890Sopenharmony_ci  mm_li16_op,
50222851890Sopenharmony_ci  mm_jalx32_op,
50322851890Sopenharmony_ci  mm_jal32_op,
50422851890Sopenharmony_ci  mm_sw32_op,
50522851890Sopenharmony_ci  mm_lw32_op,
50622851890Sopenharmony_ci};
50722851890Sopenharmony_cienum mm_32i_minor_op {
50822851890Sopenharmony_ci  mm_bltz_op,
50922851890Sopenharmony_ci  mm_bltzal_op,
51022851890Sopenharmony_ci  mm_bgez_op,
51122851890Sopenharmony_ci  mm_bgezal_op,
51222851890Sopenharmony_ci  mm_blez_op,
51322851890Sopenharmony_ci  mm_bnezc_op,
51422851890Sopenharmony_ci  mm_bgtz_op,
51522851890Sopenharmony_ci  mm_beqzc_op,
51622851890Sopenharmony_ci  mm_tlti_op,
51722851890Sopenharmony_ci  mm_tgei_op,
51822851890Sopenharmony_ci  mm_tltiu_op,
51922851890Sopenharmony_ci  mm_tgeiu_op,
52022851890Sopenharmony_ci  mm_tnei_op,
52122851890Sopenharmony_ci  mm_lui_op,
52222851890Sopenharmony_ci  mm_teqi_op,
52322851890Sopenharmony_ci  mm_reserved13_op,
52422851890Sopenharmony_ci  mm_synci_op,
52522851890Sopenharmony_ci  mm_bltzals_op,
52622851890Sopenharmony_ci  mm_reserved14_op,
52722851890Sopenharmony_ci  mm_bgezals_op,
52822851890Sopenharmony_ci  mm_bc2f_op,
52922851890Sopenharmony_ci  mm_bc2t_op,
53022851890Sopenharmony_ci  mm_reserved15_op,
53122851890Sopenharmony_ci  mm_reserved16_op,
53222851890Sopenharmony_ci  mm_reserved17_op,
53322851890Sopenharmony_ci  mm_reserved18_op,
53422851890Sopenharmony_ci  mm_bposge64_op,
53522851890Sopenharmony_ci  mm_bposge32_op,
53622851890Sopenharmony_ci  mm_bc1f_op,
53722851890Sopenharmony_ci  mm_bc1t_op,
53822851890Sopenharmony_ci  mm_reserved19_op,
53922851890Sopenharmony_ci  mm_reserved20_op,
54022851890Sopenharmony_ci  mm_bc1any2f_op,
54122851890Sopenharmony_ci  mm_bc1any2t_op,
54222851890Sopenharmony_ci  mm_bc1any4f_op,
54322851890Sopenharmony_ci  mm_bc1any4t_op,
54422851890Sopenharmony_ci};
54522851890Sopenharmony_cienum mm_32a_minor_op {
54622851890Sopenharmony_ci  mm_sll32_op = 0x000,
54722851890Sopenharmony_ci  mm_ins_op = 0x00c,
54822851890Sopenharmony_ci  mm_sllv32_op = 0x010,
54922851890Sopenharmony_ci  mm_ext_op = 0x02c,
55022851890Sopenharmony_ci  mm_pool32axf_op = 0x03c,
55122851890Sopenharmony_ci  mm_srl32_op = 0x040,
55222851890Sopenharmony_ci  mm_srlv32_op = 0x050,
55322851890Sopenharmony_ci  mm_sra_op = 0x080,
55422851890Sopenharmony_ci  mm_srav_op = 0x090,
55522851890Sopenharmony_ci  mm_rotr_op = 0x0c0,
55622851890Sopenharmony_ci  mm_lwxs_op = 0x118,
55722851890Sopenharmony_ci  mm_addu32_op = 0x150,
55822851890Sopenharmony_ci  mm_subu32_op = 0x1d0,
55922851890Sopenharmony_ci  mm_wsbh_op = 0x1ec,
56022851890Sopenharmony_ci  mm_mul_op = 0x210,
56122851890Sopenharmony_ci  mm_and_op = 0x250,
56222851890Sopenharmony_ci  mm_or32_op = 0x290,
56322851890Sopenharmony_ci  mm_xor32_op = 0x310,
56422851890Sopenharmony_ci  mm_slt_op = 0x350,
56522851890Sopenharmony_ci  mm_sltu_op = 0x390,
56622851890Sopenharmony_ci};
56722851890Sopenharmony_cienum mm_32b_func {
56822851890Sopenharmony_ci  mm_lwc2_func = 0x0,
56922851890Sopenharmony_ci  mm_lwp_func = 0x1,
57022851890Sopenharmony_ci  mm_ldc2_func = 0x2,
57122851890Sopenharmony_ci  mm_ldp_func = 0x4,
57222851890Sopenharmony_ci  mm_lwm32_func = 0x5,
57322851890Sopenharmony_ci  mm_cache_func = 0x6,
57422851890Sopenharmony_ci  mm_ldm_func = 0x7,
57522851890Sopenharmony_ci  mm_swc2_func = 0x8,
57622851890Sopenharmony_ci  mm_swp_func = 0x9,
57722851890Sopenharmony_ci  mm_sdc2_func = 0xa,
57822851890Sopenharmony_ci  mm_sdp_func = 0xc,
57922851890Sopenharmony_ci  mm_swm32_func = 0xd,
58022851890Sopenharmony_ci  mm_sdm_func = 0xf,
58122851890Sopenharmony_ci};
58222851890Sopenharmony_cienum mm_32c_func {
58322851890Sopenharmony_ci  mm_pref_func = 0x2,
58422851890Sopenharmony_ci  mm_ll_func = 0x3,
58522851890Sopenharmony_ci  mm_swr_func = 0x9,
58622851890Sopenharmony_ci  mm_sc_func = 0xb,
58722851890Sopenharmony_ci  mm_lwu_func = 0xe,
58822851890Sopenharmony_ci};
58922851890Sopenharmony_cienum mm_32axf_minor_op {
59022851890Sopenharmony_ci  mm_mfc0_op = 0x003,
59122851890Sopenharmony_ci  mm_mtc0_op = 0x00b,
59222851890Sopenharmony_ci  mm_tlbp_op = 0x00d,
59322851890Sopenharmony_ci  mm_mfhi32_op = 0x035,
59422851890Sopenharmony_ci  mm_jalr_op = 0x03c,
59522851890Sopenharmony_ci  mm_tlbr_op = 0x04d,
59622851890Sopenharmony_ci  mm_mflo32_op = 0x075,
59722851890Sopenharmony_ci  mm_jalrhb_op = 0x07c,
59822851890Sopenharmony_ci  mm_tlbwi_op = 0x08d,
59922851890Sopenharmony_ci  mm_mthi32_op = 0x0b5,
60022851890Sopenharmony_ci  mm_tlbwr_op = 0x0cd,
60122851890Sopenharmony_ci  mm_mtlo32_op = 0x0f5,
60222851890Sopenharmony_ci  mm_di_op = 0x11d,
60322851890Sopenharmony_ci  mm_jalrs_op = 0x13c,
60422851890Sopenharmony_ci  mm_jalrshb_op = 0x17c,
60522851890Sopenharmony_ci  mm_sync_op = 0x1ad,
60622851890Sopenharmony_ci  mm_syscall_op = 0x22d,
60722851890Sopenharmony_ci  mm_wait_op = 0x24d,
60822851890Sopenharmony_ci  mm_eret_op = 0x3cd,
60922851890Sopenharmony_ci  mm_divu_op = 0x5dc,
61022851890Sopenharmony_ci};
61122851890Sopenharmony_cienum mm_32f_minor_op {
61222851890Sopenharmony_ci  mm_32f_00_op = 0x00,
61322851890Sopenharmony_ci  mm_32f_01_op = 0x01,
61422851890Sopenharmony_ci  mm_32f_02_op = 0x02,
61522851890Sopenharmony_ci  mm_32f_10_op = 0x08,
61622851890Sopenharmony_ci  mm_32f_11_op = 0x09,
61722851890Sopenharmony_ci  mm_32f_12_op = 0x0a,
61822851890Sopenharmony_ci  mm_32f_20_op = 0x10,
61922851890Sopenharmony_ci  mm_32f_30_op = 0x18,
62022851890Sopenharmony_ci  mm_32f_40_op = 0x20,
62122851890Sopenharmony_ci  mm_32f_41_op = 0x21,
62222851890Sopenharmony_ci  mm_32f_42_op = 0x22,
62322851890Sopenharmony_ci  mm_32f_50_op = 0x28,
62422851890Sopenharmony_ci  mm_32f_51_op = 0x29,
62522851890Sopenharmony_ci  mm_32f_52_op = 0x2a,
62622851890Sopenharmony_ci  mm_32f_60_op = 0x30,
62722851890Sopenharmony_ci  mm_32f_70_op = 0x38,
62822851890Sopenharmony_ci  mm_32f_73_op = 0x3b,
62922851890Sopenharmony_ci  mm_32f_74_op = 0x3c,
63022851890Sopenharmony_ci};
63122851890Sopenharmony_cienum mm_32f_10_minor_op {
63222851890Sopenharmony_ci  mm_lwxc1_op = 0x1,
63322851890Sopenharmony_ci  mm_swxc1_op,
63422851890Sopenharmony_ci  mm_ldxc1_op,
63522851890Sopenharmony_ci  mm_sdxc1_op,
63622851890Sopenharmony_ci  mm_luxc1_op,
63722851890Sopenharmony_ci  mm_suxc1_op,
63822851890Sopenharmony_ci};
63922851890Sopenharmony_cienum mm_32f_func {
64022851890Sopenharmony_ci  mm_lwxc1_func = 0x048,
64122851890Sopenharmony_ci  mm_swxc1_func = 0x088,
64222851890Sopenharmony_ci  mm_ldxc1_func = 0x0c8,
64322851890Sopenharmony_ci  mm_sdxc1_func = 0x108,
64422851890Sopenharmony_ci};
64522851890Sopenharmony_cienum mm_32f_40_minor_op {
64622851890Sopenharmony_ci  mm_fmovf_op,
64722851890Sopenharmony_ci  mm_fmovt_op,
64822851890Sopenharmony_ci};
64922851890Sopenharmony_cienum mm_32f_60_minor_op {
65022851890Sopenharmony_ci  mm_fadd_op,
65122851890Sopenharmony_ci  mm_fsub_op,
65222851890Sopenharmony_ci  mm_fmul_op,
65322851890Sopenharmony_ci  mm_fdiv_op,
65422851890Sopenharmony_ci};
65522851890Sopenharmony_cienum mm_32f_70_minor_op {
65622851890Sopenharmony_ci  mm_fmovn_op,
65722851890Sopenharmony_ci  mm_fmovz_op,
65822851890Sopenharmony_ci};
65922851890Sopenharmony_cienum mm_32f_73_minor_op {
66022851890Sopenharmony_ci  mm_fmov0_op = 0x01,
66122851890Sopenharmony_ci  mm_fcvtl_op = 0x04,
66222851890Sopenharmony_ci  mm_movf0_op = 0x05,
66322851890Sopenharmony_ci  mm_frsqrt_op = 0x08,
66422851890Sopenharmony_ci  mm_ffloorl_op = 0x0c,
66522851890Sopenharmony_ci  mm_fabs0_op = 0x0d,
66622851890Sopenharmony_ci  mm_fcvtw_op = 0x24,
66722851890Sopenharmony_ci  mm_movt0_op = 0x25,
66822851890Sopenharmony_ci  mm_fsqrt_op = 0x28,
66922851890Sopenharmony_ci  mm_ffloorw_op = 0x2c,
67022851890Sopenharmony_ci  mm_fneg0_op = 0x2d,
67122851890Sopenharmony_ci  mm_cfc1_op = 0x40,
67222851890Sopenharmony_ci  mm_frecip_op = 0x48,
67322851890Sopenharmony_ci  mm_fceill_op = 0x4c,
67422851890Sopenharmony_ci  mm_fcvtd0_op = 0x4d,
67522851890Sopenharmony_ci  mm_ctc1_op = 0x60,
67622851890Sopenharmony_ci  mm_fceilw_op = 0x6c,
67722851890Sopenharmony_ci  mm_fcvts0_op = 0x6d,
67822851890Sopenharmony_ci  mm_mfc1_op = 0x80,
67922851890Sopenharmony_ci  mm_fmov1_op = 0x81,
68022851890Sopenharmony_ci  mm_movf1_op = 0x85,
68122851890Sopenharmony_ci  mm_ftruncl_op = 0x8c,
68222851890Sopenharmony_ci  mm_fabs1_op = 0x8d,
68322851890Sopenharmony_ci  mm_mtc1_op = 0xa0,
68422851890Sopenharmony_ci  mm_movt1_op = 0xa5,
68522851890Sopenharmony_ci  mm_ftruncw_op = 0xac,
68622851890Sopenharmony_ci  mm_fneg1_op = 0xad,
68722851890Sopenharmony_ci  mm_mfhc1_op = 0xc0,
68822851890Sopenharmony_ci  mm_froundl_op = 0xcc,
68922851890Sopenharmony_ci  mm_fcvtd1_op = 0xcd,
69022851890Sopenharmony_ci  mm_mthc1_op = 0xe0,
69122851890Sopenharmony_ci  mm_froundw_op = 0xec,
69222851890Sopenharmony_ci  mm_fcvts1_op = 0xed,
69322851890Sopenharmony_ci};
69422851890Sopenharmony_cienum mm_32s_minor_op {
69522851890Sopenharmony_ci  mm_32s_elm_op = 0x16,
69622851890Sopenharmony_ci};
69722851890Sopenharmony_cienum mm_16c_minor_op {
69822851890Sopenharmony_ci  mm_lwm16_op = 0x04,
69922851890Sopenharmony_ci  mm_swm16_op = 0x05,
70022851890Sopenharmony_ci  mm_jr16_op = 0x0c,
70122851890Sopenharmony_ci  mm_jrc_op = 0x0d,
70222851890Sopenharmony_ci  mm_jalr16_op = 0x0e,
70322851890Sopenharmony_ci  mm_jalrs16_op = 0x0f,
70422851890Sopenharmony_ci  mm_jraddiusp_op = 0x18,
70522851890Sopenharmony_ci};
70622851890Sopenharmony_cienum mm_16d_minor_op {
70722851890Sopenharmony_ci  mm_addius5_func,
70822851890Sopenharmony_ci  mm_addiusp_func,
70922851890Sopenharmony_ci};
71022851890Sopenharmony_cienum MIPS16e_ops {
71122851890Sopenharmony_ci  MIPS16e_jal_op = 003,
71222851890Sopenharmony_ci  MIPS16e_ld_op = 007,
71322851890Sopenharmony_ci  MIPS16e_i8_op = 014,
71422851890Sopenharmony_ci  MIPS16e_sd_op = 017,
71522851890Sopenharmony_ci  MIPS16e_lb_op = 020,
71622851890Sopenharmony_ci  MIPS16e_lh_op = 021,
71722851890Sopenharmony_ci  MIPS16e_lwsp_op = 022,
71822851890Sopenharmony_ci  MIPS16e_lw_op = 023,
71922851890Sopenharmony_ci  MIPS16e_lbu_op = 024,
72022851890Sopenharmony_ci  MIPS16e_lhu_op = 025,
72122851890Sopenharmony_ci  MIPS16e_lwpc_op = 026,
72222851890Sopenharmony_ci  MIPS16e_lwu_op = 027,
72322851890Sopenharmony_ci  MIPS16e_sb_op = 030,
72422851890Sopenharmony_ci  MIPS16e_sh_op = 031,
72522851890Sopenharmony_ci  MIPS16e_swsp_op = 032,
72622851890Sopenharmony_ci  MIPS16e_sw_op = 033,
72722851890Sopenharmony_ci  MIPS16e_rr_op = 035,
72822851890Sopenharmony_ci  MIPS16e_extend_op = 036,
72922851890Sopenharmony_ci  MIPS16e_i64_op = 037,
73022851890Sopenharmony_ci};
73122851890Sopenharmony_cienum MIPS16e_i64_func {
73222851890Sopenharmony_ci  MIPS16e_ldsp_func,
73322851890Sopenharmony_ci  MIPS16e_sdsp_func,
73422851890Sopenharmony_ci  MIPS16e_sdrasp_func,
73522851890Sopenharmony_ci  MIPS16e_dadjsp_func,
73622851890Sopenharmony_ci  MIPS16e_ldpc_func,
73722851890Sopenharmony_ci};
73822851890Sopenharmony_cienum MIPS16e_rr_func {
73922851890Sopenharmony_ci  MIPS16e_jr_func,
74022851890Sopenharmony_ci};
74122851890Sopenharmony_cienum MIPS6e_i8_func {
74222851890Sopenharmony_ci  MIPS16e_swrasp_func = 02,
74322851890Sopenharmony_ci};
74422851890Sopenharmony_ci#define MM_NOP16 0x0c00
74522851890Sopenharmony_cistruct j_format {
74622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int target : 26,;
74722851890Sopenharmony_ci ))
74822851890Sopenharmony_ci};
74922851890Sopenharmony_cistruct i_format {
75022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(signed int simmediate : 16,;
75122851890Sopenharmony_ci ))))
75222851890Sopenharmony_ci};
75322851890Sopenharmony_cistruct u_format {
75422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int uimmediate : 16,;
75522851890Sopenharmony_ci ))))
75622851890Sopenharmony_ci};
75722851890Sopenharmony_cistruct c_format {
75822851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int c_op : 3, __BITFIELD_FIELD(unsigned int cache : 2, __BITFIELD_FIELD(unsigned int simmediate : 16,;
75922851890Sopenharmony_ci )))))
76022851890Sopenharmony_ci};
76122851890Sopenharmony_cistruct r_format {
76222851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,;
76322851890Sopenharmony_ci ))))))
76422851890Sopenharmony_ci};
76522851890Sopenharmony_cistruct c0r_format {
76622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int z : 8, __BITFIELD_FIELD(unsigned int sel : 3,;
76722851890Sopenharmony_ci ))))))
76822851890Sopenharmony_ci};
76922851890Sopenharmony_cistruct mfmc0_format {
77022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int sc : 1, __BITFIELD_FIELD(unsigned int : 2, __BITFIELD_FIELD(unsigned int sel : 3,;
77122851890Sopenharmony_ci ))))))))
77222851890Sopenharmony_ci};
77322851890Sopenharmony_cistruct co_format {
77422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int co : 1, __BITFIELD_FIELD(unsigned int code : 19, __BITFIELD_FIELD(unsigned int func : 6,;
77522851890Sopenharmony_ci ))))
77622851890Sopenharmony_ci};
77722851890Sopenharmony_cistruct p_format {
77822851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,;
77922851890Sopenharmony_ci ))))))
78022851890Sopenharmony_ci};
78122851890Sopenharmony_cistruct f_format {
78222851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int : 1, __BITFIELD_FIELD(unsigned int fmt : 4, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,;
78322851890Sopenharmony_ci )))))))
78422851890Sopenharmony_ci};
78522851890Sopenharmony_cistruct ma_format {
78622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int fmt : 2,;
78722851890Sopenharmony_ci )))))))
78822851890Sopenharmony_ci};
78922851890Sopenharmony_cistruct b_format {
79022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int code : 20, __BITFIELD_FIELD(unsigned int func : 6,;
79122851890Sopenharmony_ci )))
79222851890Sopenharmony_ci};
79322851890Sopenharmony_cistruct ps_format {
79422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
79522851890Sopenharmony_ci ))))))
79622851890Sopenharmony_ci};
79722851890Sopenharmony_cistruct v_format {
79822851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int sel : 4, __BITFIELD_FIELD(unsigned int fmt : 1, __BITFIELD_FIELD(unsigned int vt : 5, __BITFIELD_FIELD(unsigned int vs : 5, __BITFIELD_FIELD(unsigned int vd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
79922851890Sopenharmony_ci )))))))
80022851890Sopenharmony_ci};
80122851890Sopenharmony_cistruct msa_mi10_format {
80222851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(signed int s10 : 10, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int wd : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int df : 2,;
80322851890Sopenharmony_ci ))))))
80422851890Sopenharmony_ci};
80522851890Sopenharmony_cistruct dsp_format {
80622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int func : 6,;
80722851890Sopenharmony_ci ))))))
80822851890Sopenharmony_ci};
80922851890Sopenharmony_cistruct spec3_format {
81022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(signed int simmediate : 9, __BITFIELD_FIELD(unsigned int func : 7,;
81122851890Sopenharmony_ci )))))
81222851890Sopenharmony_ci};
81322851890Sopenharmony_cistruct fb_format {
81422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int bc : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int flag : 2, __BITFIELD_FIELD(signed int simmediate : 16,;
81522851890Sopenharmony_ci )))))
81622851890Sopenharmony_ci};
81722851890Sopenharmony_cistruct fp0_format {
81822851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fmt : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
81922851890Sopenharmony_ci ))))))
82022851890Sopenharmony_ci};
82122851890Sopenharmony_cistruct mm_fp0_format {
82222851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int op : 2, __BITFIELD_FIELD(unsigned int func : 6,;
82322851890Sopenharmony_ci )))))))
82422851890Sopenharmony_ci};
82522851890Sopenharmony_cistruct fp1_format {
82622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
82722851890Sopenharmony_ci ))))))
82822851890Sopenharmony_ci};
82922851890Sopenharmony_cistruct mm_fp1_format {
83022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fmt : 2, __BITFIELD_FIELD(unsigned int op : 8, __BITFIELD_FIELD(unsigned int func : 6,;
83122851890Sopenharmony_ci ))))))
83222851890Sopenharmony_ci};
83322851890Sopenharmony_cistruct mm_fp2_format {
83422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int zero : 2, __BITFIELD_FIELD(unsigned int fmt : 2, __BITFIELD_FIELD(unsigned int op : 3, __BITFIELD_FIELD(unsigned int func : 6,;
83522851890Sopenharmony_ci ))))))))
83622851890Sopenharmony_ci};
83722851890Sopenharmony_cistruct mm_fp3_format {
83822851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int op : 7, __BITFIELD_FIELD(unsigned int func : 6,;
83922851890Sopenharmony_ci ))))))
84022851890Sopenharmony_ci};
84122851890Sopenharmony_cistruct mm_fp4_format {
84222851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int cond : 4, __BITFIELD_FIELD(unsigned int func : 6,;
84322851890Sopenharmony_ci )))))))
84422851890Sopenharmony_ci};
84522851890Sopenharmony_cistruct mm_fp5_format {
84622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int func : 6,;
84722851890Sopenharmony_ci ))))))
84822851890Sopenharmony_ci};
84922851890Sopenharmony_cistruct fp6_format {
85022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
85122851890Sopenharmony_ci ))))))
85222851890Sopenharmony_ci};
85322851890Sopenharmony_cistruct mm_fp6_format {
85422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int func : 6,;
85522851890Sopenharmony_ci ))))))
85622851890Sopenharmony_ci};
85722851890Sopenharmony_cistruct mm_i_format {
85822851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(signed int simmediate : 16,;
85922851890Sopenharmony_ci ))))
86022851890Sopenharmony_ci};
86122851890Sopenharmony_cistruct mm_m_format {
86222851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(signed int simmediate : 12,;
86322851890Sopenharmony_ci )))))
86422851890Sopenharmony_ci};
86522851890Sopenharmony_cistruct mm_x_format {
86622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int func : 11,;
86722851890Sopenharmony_ci )))))
86822851890Sopenharmony_ci};
86922851890Sopenharmony_cistruct mm_a_format {
87022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 3, __BITFIELD_FIELD(signed int simmediate : 23,;
87122851890Sopenharmony_ci )))
87222851890Sopenharmony_ci};
87322851890Sopenharmony_cistruct mm_b0_format {
87422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(signed int simmediate : 10, __BITFIELD_FIELD(unsigned int : 16,;
87522851890Sopenharmony_ci )))
87622851890Sopenharmony_ci};
87722851890Sopenharmony_cistruct mm_b1_format {
87822851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 3, __BITFIELD_FIELD(signed int simmediate : 7, __BITFIELD_FIELD(unsigned int : 16,;
87922851890Sopenharmony_ci ))))
88022851890Sopenharmony_ci};
88122851890Sopenharmony_cistruct mm16_m_format {
88222851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int rlist : 2, __BITFIELD_FIELD(unsigned int imm : 4, __BITFIELD_FIELD(unsigned int : 16,;
88322851890Sopenharmony_ci )))))
88422851890Sopenharmony_ci};
88522851890Sopenharmony_cistruct mm16_rb_format {
88622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 3, __BITFIELD_FIELD(unsigned int base : 3, __BITFIELD_FIELD(signed int simmediate : 4, __BITFIELD_FIELD(unsigned int : 16,;
88722851890Sopenharmony_ci )))))
88822851890Sopenharmony_ci};
88922851890Sopenharmony_cistruct mm16_r3_format {
89022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 3, __BITFIELD_FIELD(signed int simmediate : 7, __BITFIELD_FIELD(unsigned int : 16,;
89122851890Sopenharmony_ci ))))
89222851890Sopenharmony_ci};
89322851890Sopenharmony_cistruct mm16_r5_format {
89422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int imm : 5, __BITFIELD_FIELD(unsigned int : 16,;
89522851890Sopenharmony_ci ))))
89622851890Sopenharmony_ci};
89722851890Sopenharmony_cistruct loongson3_lswc2_format {
89822851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fr : 1, __BITFIELD_FIELD(unsigned int offset : 9, __BITFIELD_FIELD(unsigned int ls : 1, __BITFIELD_FIELD(unsigned int rq : 5,;
89922851890Sopenharmony_ci )))))))
90022851890Sopenharmony_ci};
90122851890Sopenharmony_cistruct loongson3_lsdc2_format {
90222851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int offset : 8, __BITFIELD_FIELD(unsigned int opcode1 : 3,;
90322851890Sopenharmony_ci ))))))
90422851890Sopenharmony_ci};
90522851890Sopenharmony_cistruct loongson3_lscsr_format {
90622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,;
90722851890Sopenharmony_ci ))))))
90822851890Sopenharmony_ci};
90922851890Sopenharmony_cistruct m16e_rr {
91022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int nd : 1, __BITFIELD_FIELD(unsigned int l : 1, __BITFIELD_FIELD(unsigned int ra : 1, __BITFIELD_FIELD(unsigned int func : 5,;
91122851890Sopenharmony_ci ))))))
91222851890Sopenharmony_ci};
91322851890Sopenharmony_cistruct m16e_jal {
91422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int x : 1, __BITFIELD_FIELD(unsigned int imm20_16 : 5, __BITFIELD_FIELD(signed int imm25_21 : 5,;
91522851890Sopenharmony_ci ))))
91622851890Sopenharmony_ci};
91722851890Sopenharmony_cistruct m16e_i64 {
91822851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int imm : 8,;
91922851890Sopenharmony_ci )))
92022851890Sopenharmony_ci};
92122851890Sopenharmony_cistruct m16e_ri64 {
92222851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int ry : 3, __BITFIELD_FIELD(unsigned int imm : 5,;
92322851890Sopenharmony_ci ))))
92422851890Sopenharmony_ci};
92522851890Sopenharmony_cistruct m16e_ri {
92622851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int imm : 8,;
92722851890Sopenharmony_ci )))
92822851890Sopenharmony_ci};
92922851890Sopenharmony_cistruct m16e_rri {
93022851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int ry : 3, __BITFIELD_FIELD(unsigned int imm : 5,;
93122851890Sopenharmony_ci ))))
93222851890Sopenharmony_ci};
93322851890Sopenharmony_cistruct m16e_i8 {
93422851890Sopenharmony_ci  __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int imm : 8,;
93522851890Sopenharmony_ci )))
93622851890Sopenharmony_ci};
93722851890Sopenharmony_ciunion mips_instruction {
93822851890Sopenharmony_ci  unsigned int word;
93922851890Sopenharmony_ci  unsigned short halfword[2];
94022851890Sopenharmony_ci  unsigned char byte[4];
94122851890Sopenharmony_ci  struct j_format j_format;
94222851890Sopenharmony_ci  struct i_format i_format;
94322851890Sopenharmony_ci  struct u_format u_format;
94422851890Sopenharmony_ci  struct c_format c_format;
94522851890Sopenharmony_ci  struct r_format r_format;
94622851890Sopenharmony_ci  struct c0r_format c0r_format;
94722851890Sopenharmony_ci  struct mfmc0_format mfmc0_format;
94822851890Sopenharmony_ci  struct co_format co_format;
94922851890Sopenharmony_ci  struct p_format p_format;
95022851890Sopenharmony_ci  struct f_format f_format;
95122851890Sopenharmony_ci  struct ma_format ma_format;
95222851890Sopenharmony_ci  struct msa_mi10_format msa_mi10_format;
95322851890Sopenharmony_ci  struct b_format b_format;
95422851890Sopenharmony_ci  struct ps_format ps_format;
95522851890Sopenharmony_ci  struct v_format v_format;
95622851890Sopenharmony_ci  struct dsp_format dsp_format;
95722851890Sopenharmony_ci  struct spec3_format spec3_format;
95822851890Sopenharmony_ci  struct fb_format fb_format;
95922851890Sopenharmony_ci  struct fp0_format fp0_format;
96022851890Sopenharmony_ci  struct mm_fp0_format mm_fp0_format;
96122851890Sopenharmony_ci  struct fp1_format fp1_format;
96222851890Sopenharmony_ci  struct mm_fp1_format mm_fp1_format;
96322851890Sopenharmony_ci  struct mm_fp2_format mm_fp2_format;
96422851890Sopenharmony_ci  struct mm_fp3_format mm_fp3_format;
96522851890Sopenharmony_ci  struct mm_fp4_format mm_fp4_format;
96622851890Sopenharmony_ci  struct mm_fp5_format mm_fp5_format;
96722851890Sopenharmony_ci  struct fp6_format fp6_format;
96822851890Sopenharmony_ci  struct mm_fp6_format mm_fp6_format;
96922851890Sopenharmony_ci  struct mm_i_format mm_i_format;
97022851890Sopenharmony_ci  struct mm_m_format mm_m_format;
97122851890Sopenharmony_ci  struct mm_x_format mm_x_format;
97222851890Sopenharmony_ci  struct mm_a_format mm_a_format;
97322851890Sopenharmony_ci  struct mm_b0_format mm_b0_format;
97422851890Sopenharmony_ci  struct mm_b1_format mm_b1_format;
97522851890Sopenharmony_ci  struct mm16_m_format mm16_m_format;
97622851890Sopenharmony_ci  struct mm16_rb_format mm16_rb_format;
97722851890Sopenharmony_ci  struct mm16_r3_format mm16_r3_format;
97822851890Sopenharmony_ci  struct mm16_r5_format mm16_r5_format;
97922851890Sopenharmony_ci  struct loongson3_lswc2_format loongson3_lswc2_format;
98022851890Sopenharmony_ci  struct loongson3_lsdc2_format loongson3_lsdc2_format;
98122851890Sopenharmony_ci  struct loongson3_lscsr_format loongson3_lscsr_format;
98222851890Sopenharmony_ci};
98322851890Sopenharmony_ciunion mips16e_instruction {
98422851890Sopenharmony_ci  unsigned int full : 16;
98522851890Sopenharmony_ci  struct m16e_rr rr;
98622851890Sopenharmony_ci  struct m16e_jal jal;
98722851890Sopenharmony_ci  struct m16e_i64 i64;
98822851890Sopenharmony_ci  struct m16e_ri64 ri64;
98922851890Sopenharmony_ci  struct m16e_ri ri;
99022851890Sopenharmony_ci  struct m16e_rri rri;
99122851890Sopenharmony_ci  struct m16e_i8 i8;
99222851890Sopenharmony_ci};
99322851890Sopenharmony_ci#endif
994