162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* SPU ELF support for BFD. 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci Copyright 2006 Free Software Foundation, Inc. 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci This file is part of BFD, the Binary File Descriptor library. 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci/* SPU Opcode Table 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci-=-=-= FORMAT =-=-=- 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci +----+-------+-------+-------+-------+ +------------+-------+-------+-------+ 1562306a36Sopenharmony_ciRRR | op | RC | RB | RA | RT | RI7 | op | I7 | RA | RT | 1662306a36Sopenharmony_ci +----+-------+-------+-------+-------+ +------------+-------+-------+-------+ 1762306a36Sopenharmony_ci 0 3 1 1 2 3 0 1 1 2 3 1862306a36Sopenharmony_ci 0 7 4 1 0 7 4 1 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci +-----------+--------+-------+-------+ +---------+----------+-------+-------+ 2162306a36Sopenharmony_ciRI8 | op | I8 | RA | RT | RI10 | op | I10 | RA | RT | 2262306a36Sopenharmony_ci +-----------+--------+-------+-------+ +---------+----------+-------+-------+ 2362306a36Sopenharmony_ci 0 9 1 2 3 0 7 1 2 3 2462306a36Sopenharmony_ci 7 4 1 7 4 1 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci +----------+-----------------+-------+ +--------+-------------------+-------+ 2762306a36Sopenharmony_ciRI16 | op | I16 | RT | RI18 | op | I18 | RT | 2862306a36Sopenharmony_ci +----------+-----------------+-------+ +--------+-------------------+-------+ 2962306a36Sopenharmony_ci 0 8 2 3 0 6 2 3 3062306a36Sopenharmony_ci 4 1 4 1 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci +------------+-------+-------+-------+ +-------+--+-----------------+-------+ 3362306a36Sopenharmony_ciRR | op | RB | RA | RT | LBT | op |RO| I16 | RO | 3462306a36Sopenharmony_ci +------------+-------+-------+-------+ +-------+--+-----------------+-------+ 3562306a36Sopenharmony_ci 0 1 1 2 3 0 6 8 2 3 3662306a36Sopenharmony_ci 0 7 4 1 4 1 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci +------------+----+--+-------+-------+ 3962306a36Sopenharmony_ci LBTI | op | // |RO| RA | RO | 4062306a36Sopenharmony_ci +------------+----+--+-------+-------+ 4162306a36Sopenharmony_ci 0 1 1 1 2 3 4262306a36Sopenharmony_ci 0 5 7 4 1 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci-=-=-= OPCODE =-=-=- 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ciOPCODE field specifies the most significant 11bit of the instruction. Some formats don't have 11bits for opcode field, and in this 4762306a36Sopenharmony_cicase, bit field other than op are defined as 0s. For example, opcode of fma instruction which is RRR format is defined as 0x700, 4862306a36Sopenharmony_cisince 0x700 -> 11'b11100000000, this means opcode is 4'b1110, and other 7bits are defined as 7'b0000000. 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci-=-=-= ASM_FORMAT =-=-=- 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ciRRR category RI7 category 5362306a36Sopenharmony_ci ASM_RRR mnemonic RC, RA, RB, RT ASM_RI4 mnemonic RT, RA, I4 5462306a36Sopenharmony_ci ASM_RI7 mnemonic RT, RA, I7 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ciRI8 category RI10 category 5762306a36Sopenharmony_ci ASM_RUI8 mnemonic RT, RA, UI8 ASM_AI10 mnemonic RA, I10 5862306a36Sopenharmony_ci ASM_RI10 mnemonic RT, RA, R10 5962306a36Sopenharmony_ci ASM_RI10IDX mnemonic RT, I10(RA) 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ciRI16 category RI18 category 6262306a36Sopenharmony_ci ASM_I16W mnemonic I16W ASM_RI18 mnemonic RT, I18 6362306a36Sopenharmony_ci ASM_RI16 mnemonic RT, I16 6462306a36Sopenharmony_ci ASM_RI16W mnemonic RT, I16W 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ciRR category LBT category 6762306a36Sopenharmony_ci ASM_MFSPR mnemonic RT, SA ASM_LBT mnemonic brinst, brtarg 6862306a36Sopenharmony_ci ASM_MTSPR mnemonic SA, RT 6962306a36Sopenharmony_ci ASM_NOOP mnemonic LBTI category 7062306a36Sopenharmony_ci ASM_RA mnemonic RA ASM_LBTI mnemonic brinst, RA 7162306a36Sopenharmony_ci ASM_RAB mnemonic RA, RB 7262306a36Sopenharmony_ci ASM_RDCH mnemonic RT, CA 7362306a36Sopenharmony_ci ASM_RR mnemonic RT, RA, RB 7462306a36Sopenharmony_ci ASM_RT mnemonic RT 7562306a36Sopenharmony_ci ASM_RTA mnemonic RT, RA 7662306a36Sopenharmony_ci ASM_WRCH mnemonic CA, RT 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ciNote that RRR instructions have the names for RC and RT reversed from 7962306a36Sopenharmony_ciwhat's in the ISA, in order to put RT in the same position it appears 8062306a36Sopenharmony_cifor other formats. 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci-=-=-= DEPENDENCY =-=-=- 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ciDEPENDENCY filed consists of 5 digits. This represents which register is used as source and which register is used as target. 8562306a36Sopenharmony_ciThe first(most significant) digit is always 0. Then it is followd by RC, RB, RA and RT digits. 8662306a36Sopenharmony_ciIf the digit is 0, this means the corresponding register is not used in the instruction. 8762306a36Sopenharmony_ciIf the digit is 1, this means the corresponding register is used as a source in the instruction. 8862306a36Sopenharmony_ciIf the digit is 2, this means the corresponding register is used as a target in the instruction. 8962306a36Sopenharmony_ciIf the digit is 3, this means the corresponding register is used as both source and target in the instruction. 9062306a36Sopenharmony_ciFor example, fms instruction has 00113 as the DEPENDENCY field. This means RC is not used in this operation, RB and RA are 9162306a36Sopenharmony_ciused as sources and RT is the target. 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci-=-=-= PIPE =-=-=- 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ciThis field shows which execution pipe is used for the instruction 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_cipipe0 execution pipelines: 9862306a36Sopenharmony_ci FP6 SP floating pipeline 9962306a36Sopenharmony_ci FP7 integer operations executed in SP floating pipeline 10062306a36Sopenharmony_ci FPD DP floating pipeline 10162306a36Sopenharmony_ci FX2 FXU pipeline 10262306a36Sopenharmony_ci FX3 Rotate/Shift pipeline 10362306a36Sopenharmony_ci FXB Byte pipeline 10462306a36Sopenharmony_ci NOP No pipeline 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_cipipe1 execution pipelines: 10762306a36Sopenharmony_ci BR Branch pipeline 10862306a36Sopenharmony_ci LNOP No pipeline 10962306a36Sopenharmony_ci LS Load/Store pipeline 11062306a36Sopenharmony_ci SHUF Shuffle pipeline 11162306a36Sopenharmony_ci SPR SPR/CH pipeline 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci*/ 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_ci#define _A0() {0} 11662306a36Sopenharmony_ci#define _A1(a) {1,a} 11762306a36Sopenharmony_ci#define _A2(a,b) {2,a,b} 11862306a36Sopenharmony_ci#define _A3(a,b,c) {3,a,b,c} 11962306a36Sopenharmony_ci#define _A4(a,b,c,d) {4,a,b,c,d} 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci/* TAG FORMAT OPCODE MNEMONIC ASM_FORMAT DEPENDENCY PIPE COMMENT */ 12262306a36Sopenharmony_ci/* 0[RC][RB][RA][RT] */ 12362306a36Sopenharmony_ci/* 1:src, 2:target */ 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ciAPUOP(M_BR, RI16, 0x190, "br", _A1(A_R18), 00000, BR) /* BRel IP<-IP+I16 */ 12662306a36Sopenharmony_ciAPUOP(M_BRSL, RI16, 0x198, "brsl", _A2(A_T,A_R18), 00002, BR) /* BRelSetLink RT,IP<-IP,IP+I16 */ 12762306a36Sopenharmony_ciAPUOP(M_BRA, RI16, 0x180, "bra", _A1(A_S18), 00000, BR) /* BRAbs IP<-I16 */ 12862306a36Sopenharmony_ciAPUOP(M_BRASL, RI16, 0x188, "brasl", _A2(A_T,A_S18), 00002, BR) /* BRAbsSetLink RT,IP<-IP,I16 */ 12962306a36Sopenharmony_ciAPUOP(M_FSMBI, RI16, 0x194, "fsmbi", _A2(A_T,A_X16), 00002, SHUF) /* FormSelMask%I RT<-fsm(I16) */ 13062306a36Sopenharmony_ciAPUOP(M_LQA, RI16, 0x184, "lqa", _A2(A_T,A_S18), 00002, LS) /* LoadQAbs RT<-M[I16] */ 13162306a36Sopenharmony_ciAPUOP(M_LQR, RI16, 0x19C, "lqr", _A2(A_T,A_R18), 00002, LS) /* LoadQRel RT<-M[IP+I16] */ 13262306a36Sopenharmony_ciAPUOP(M_STOP, RR, 0x000, "stop", _A0(), 00000, BR) /* STOP stop */ 13362306a36Sopenharmony_ciAPUOP(M_STOP2, RR, 0x000, "stop", _A1(A_U14), 00000, BR) /* STOP stop */ 13462306a36Sopenharmony_ciAPUOP(M_STOPD, RR, 0x140, "stopd", _A3(A_T,A_A,A_B), 00111, BR) /* STOPD stop (with register dependencies) */ 13562306a36Sopenharmony_ciAPUOP(M_LNOP, RR, 0x001, "lnop", _A0(), 00000, LNOP) /* LNOP no_operation */ 13662306a36Sopenharmony_ciAPUOP(M_SYNC, RR, 0x002, "sync", _A0(), 00000, BR) /* SYNC flush_pipe */ 13762306a36Sopenharmony_ciAPUOP(M_DSYNC, RR, 0x003, "dsync", _A0(), 00000, BR) /* DSYNC flush_store_queue */ 13862306a36Sopenharmony_ciAPUOP(M_MFSPR, RR, 0x00c, "mfspr", _A2(A_T,A_S), 00002, SPR) /* MFSPR RT<-SA */ 13962306a36Sopenharmony_ciAPUOP(M_RDCH, RR, 0x00d, "rdch", _A2(A_T,A_H), 00002, SPR) /* ReaDCHannel RT<-CA:data */ 14062306a36Sopenharmony_ciAPUOP(M_RCHCNT, RR, 0x00f, "rchcnt", _A2(A_T,A_H), 00002, SPR) /* ReaDCHanCouNT RT<-CA:count */ 14162306a36Sopenharmony_ciAPUOP(M_HBRA, LBT, 0x080, "hbra", _A2(A_S11,A_S18), 00000, LS) /* HBRA BTB[B9]<-M[I16] */ 14262306a36Sopenharmony_ciAPUOP(M_HBRR, LBT, 0x090, "hbrr", _A2(A_S11,A_R18), 00000, LS) /* HBRR BTB[B9]<-M[IP+I16] */ 14362306a36Sopenharmony_ciAPUOP(M_BRZ, RI16, 0x100, "brz", _A2(A_T,A_R18), 00001, BR) /* BRZ IP<-IP+I16_if(RT) */ 14462306a36Sopenharmony_ciAPUOP(M_BRNZ, RI16, 0x108, "brnz", _A2(A_T,A_R18), 00001, BR) /* BRNZ IP<-IP+I16_if(RT) */ 14562306a36Sopenharmony_ciAPUOP(M_BRHZ, RI16, 0x110, "brhz", _A2(A_T,A_R18), 00001, BR) /* BRHZ IP<-IP+I16_if(RT) */ 14662306a36Sopenharmony_ciAPUOP(M_BRHNZ, RI16, 0x118, "brhnz", _A2(A_T,A_R18), 00001, BR) /* BRHNZ IP<-IP+I16_if(RT) */ 14762306a36Sopenharmony_ciAPUOP(M_STQA, RI16, 0x104, "stqa", _A2(A_T,A_S18), 00001, LS) /* SToreQAbs M[I16]<-RT */ 14862306a36Sopenharmony_ciAPUOP(M_STQR, RI16, 0x11C, "stqr", _A2(A_T,A_R18), 00001, LS) /* SToreQRel M[IP+I16]<-RT */ 14962306a36Sopenharmony_ciAPUOP(M_MTSPR, RR, 0x10c, "mtspr", _A2(A_S,A_T), 00001, SPR) /* MTSPR SA<-RT */ 15062306a36Sopenharmony_ciAPUOP(M_WRCH, RR, 0x10d, "wrch", _A2(A_H,A_T), 00001, SPR) /* ChanWRite CA<-RT */ 15162306a36Sopenharmony_ciAPUOP(M_LQD, RI10, 0x1a0, "lqd", _A4(A_T,A_S14,A_P,A_A), 00012, LS) /* LoadQDisp RT<-M[Ra+I10] */ 15262306a36Sopenharmony_ciAPUOP(M_BI, RR, 0x1a8, "bi", _A1(A_A), 00010, BR) /* BI IP<-RA */ 15362306a36Sopenharmony_ciAPUOP(M_BISL, RR, 0x1a9, "bisl", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */ 15462306a36Sopenharmony_ciAPUOP(M_IRET, RR, 0x1aa, "iret", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */ 15562306a36Sopenharmony_ciAPUOP(M_IRET2, RR, 0x1aa, "iret", _A0(), 00010, BR) /* IRET IP<-SRR0 */ 15662306a36Sopenharmony_ciAPUOP(M_BISLED, RR, 0x1ab, "bisled", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */ 15762306a36Sopenharmony_ciAPUOP(M_HBR, LBTI, 0x1ac, "hbr", _A2(A_S11I,A_A), 00010, LS) /* HBR BTB[B9]<-M[Ra] */ 15862306a36Sopenharmony_ciAPUOP(M_FREST, RR, 0x1b8, "frest", _A2(A_T,A_A), 00012, SHUF) /* FREST RT<-recip(RA) */ 15962306a36Sopenharmony_ciAPUOP(M_FRSQEST, RR, 0x1b9, "frsqest", _A2(A_T,A_A), 00012, SHUF) /* FRSQEST RT<-rsqrt(RA) */ 16062306a36Sopenharmony_ciAPUOP(M_FSM, RR, 0x1b4, "fsm", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */ 16162306a36Sopenharmony_ciAPUOP(M_FSMH, RR, 0x1b5, "fsmh", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */ 16262306a36Sopenharmony_ciAPUOP(M_FSMB, RR, 0x1b6, "fsmb", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */ 16362306a36Sopenharmony_ciAPUOP(M_GB, RR, 0x1b0, "gb", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */ 16462306a36Sopenharmony_ciAPUOP(M_GBH, RR, 0x1b1, "gbh", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */ 16562306a36Sopenharmony_ciAPUOP(M_GBB, RR, 0x1b2, "gbb", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */ 16662306a36Sopenharmony_ciAPUOP(M_CBD, RI7, 0x1f4, "cbd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */ 16762306a36Sopenharmony_ciAPUOP(M_CHD, RI7, 0x1f5, "chd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */ 16862306a36Sopenharmony_ciAPUOP(M_CWD, RI7, 0x1f6, "cwd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */ 16962306a36Sopenharmony_ciAPUOP(M_CDD, RI7, 0x1f7, "cdd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */ 17062306a36Sopenharmony_ciAPUOP(M_ROTQBII, RI7, 0x1f8, "rotqbii", _A3(A_T,A_A,A_U3), 00012, SHUF) /* ROTQBII RT<-RA<<<I7 */ 17162306a36Sopenharmony_ciAPUOP(M_ROTQBYI, RI7, 0x1fc, "rotqbyi", _A3(A_T,A_A,A_S7N), 00012, SHUF) /* ROTQBYI RT<-RA<<<(I7*8) */ 17262306a36Sopenharmony_ciAPUOP(M_ROTQMBII, RI7, 0x1f9, "rotqmbii", _A3(A_T,A_A,A_S3), 00012, SHUF) /* ROTQMBII RT<-RA<<I7 */ 17362306a36Sopenharmony_ciAPUOP(M_ROTQMBYI, RI7, 0x1fd, "rotqmbyi", _A3(A_T,A_A,A_S6), 00012, SHUF) /* ROTQMBYI RT<-RA<<I7 */ 17462306a36Sopenharmony_ciAPUOP(M_SHLQBII, RI7, 0x1fb, "shlqbii", _A3(A_T,A_A,A_U3), 00012, SHUF) /* SHLQBII RT<-RA<<I7 */ 17562306a36Sopenharmony_ciAPUOP(M_SHLQBYI, RI7, 0x1ff, "shlqbyi", _A3(A_T,A_A,A_U5), 00012, SHUF) /* SHLQBYI RT<-RA<<I7 */ 17662306a36Sopenharmony_ciAPUOP(M_STQD, RI10, 0x120, "stqd", _A4(A_T,A_S14,A_P,A_A), 00011, LS) /* SToreQDisp M[Ra+I10]<-RT */ 17762306a36Sopenharmony_ciAPUOP(M_BIHNZ, RR, 0x12b, "bihnz", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */ 17862306a36Sopenharmony_ciAPUOP(M_BIHZ, RR, 0x12a, "bihz", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */ 17962306a36Sopenharmony_ciAPUOP(M_BINZ, RR, 0x129, "binz", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */ 18062306a36Sopenharmony_ciAPUOP(M_BIZ, RR, 0x128, "biz", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */ 18162306a36Sopenharmony_ciAPUOP(M_CBX, RR, 0x1d4, "cbx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */ 18262306a36Sopenharmony_ciAPUOP(M_CHX, RR, 0x1d5, "chx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */ 18362306a36Sopenharmony_ciAPUOP(M_CWX, RR, 0x1d6, "cwx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */ 18462306a36Sopenharmony_ciAPUOP(M_CDX, RR, 0x1d7, "cdx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */ 18562306a36Sopenharmony_ciAPUOP(M_LQX, RR, 0x1c4, "lqx", _A3(A_T,A_A,A_B), 00112, LS) /* LoadQindeX RT<-M[Ra+Rb] */ 18662306a36Sopenharmony_ciAPUOP(M_ROTQBI, RR, 0x1d8, "rotqbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBI RT<-RA<<<Rb */ 18762306a36Sopenharmony_ciAPUOP(M_ROTQMBI, RR, 0x1d9, "rotqmbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBI RT<-RA<<Rb */ 18862306a36Sopenharmony_ciAPUOP(M_SHLQBI, RR, 0x1db, "shlqbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBI RT<-RA<<Rb */ 18962306a36Sopenharmony_ciAPUOP(M_ROTQBY, RR, 0x1dc, "rotqby", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBY RT<-RA<<<(Rb*8) */ 19062306a36Sopenharmony_ciAPUOP(M_ROTQMBY, RR, 0x1dd, "rotqmby", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBY RT<-RA<<Rb */ 19162306a36Sopenharmony_ciAPUOP(M_SHLQBY, RR, 0x1df, "shlqby", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBY RT<-RA<<Rb */ 19262306a36Sopenharmony_ciAPUOP(M_ROTQBYBI, RR, 0x1cc, "rotqbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBYBI RT<-RA<<Rb */ 19362306a36Sopenharmony_ciAPUOP(M_ROTQMBYBI, RR, 0x1cd, "rotqmbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBYBI RT<-RA<<Rb */ 19462306a36Sopenharmony_ciAPUOP(M_SHLQBYBI, RR, 0x1cf, "shlqbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBYBI RT<-RA<<Rb */ 19562306a36Sopenharmony_ciAPUOP(M_STQX, RR, 0x144, "stqx", _A3(A_T,A_A,A_B), 00111, LS) /* SToreQindeX M[Ra+Rb]<-RT */ 19662306a36Sopenharmony_ciAPUOP(M_SHUFB, RRR, 0x580, "shufb", _A4(A_C,A_A,A_B,A_T), 02111, SHUF) /* SHUFfleBytes RC<-f(RA,RB,RT) */ 19762306a36Sopenharmony_ciAPUOP(M_IL, RI16, 0x204, "il", _A2(A_T,A_S16), 00002, FX2) /* ImmLoad RT<-sxt(I16) */ 19862306a36Sopenharmony_ciAPUOP(M_ILH, RI16, 0x20c, "ilh", _A2(A_T,A_X16), 00002, FX2) /* ImmLoadH RT<-I16 */ 19962306a36Sopenharmony_ciAPUOP(M_ILHU, RI16, 0x208, "ilhu", _A2(A_T,A_X16), 00002, FX2) /* ImmLoadHUpper RT<-I16<<16 */ 20062306a36Sopenharmony_ciAPUOP(M_ILA, RI18, 0x210, "ila", _A2(A_T,A_U18), 00002, FX2) /* ImmLoadAddr RT<-zxt(I18) */ 20162306a36Sopenharmony_ciAPUOP(M_NOP, RR, 0x201, "nop", _A1(A_T), 00000, NOP) /* XNOP no_operation */ 20262306a36Sopenharmony_ciAPUOP(M_NOP2, RR, 0x201, "nop", _A0(), 00000, NOP) /* XNOP no_operation */ 20362306a36Sopenharmony_ciAPUOP(M_IOHL, RI16, 0x304, "iohl", _A2(A_T,A_X16), 00003, FX2) /* AddImmeXt RT<-RT+sxt(I16) */ 20462306a36Sopenharmony_ciAPUOP(M_ANDBI, RI10, 0x0b0, "andbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* AND%I RT<-RA&I10 */ 20562306a36Sopenharmony_ciAPUOP(M_ANDHI, RI10, 0x0a8, "andhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* AND%I RT<-RA&I10 */ 20662306a36Sopenharmony_ciAPUOP(M_ANDI, RI10, 0x0a0, "andi", _A3(A_T,A_A,A_S10), 00012, FX2) /* AND%I RT<-RA&I10 */ 20762306a36Sopenharmony_ciAPUOP(M_ORBI, RI10, 0x030, "orbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* OR%I RT<-RA|I10 */ 20862306a36Sopenharmony_ciAPUOP(M_ORHI, RI10, 0x028, "orhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* OR%I RT<-RA|I10 */ 20962306a36Sopenharmony_ciAPUOP(M_ORI, RI10, 0x020, "ori", _A3(A_T,A_A,A_S10), 00012, FX2) /* OR%I RT<-RA|I10 */ 21062306a36Sopenharmony_ciAPUOP(M_ORX, RR, 0x1f0, "orx", _A2(A_T,A_A), 00012, BR) /* ORX RT<-RA.w0|RA.w1|RA.w2|RA.w3 */ 21162306a36Sopenharmony_ciAPUOP(M_XORBI, RI10, 0x230, "xorbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* XOR%I RT<-RA^I10 */ 21262306a36Sopenharmony_ciAPUOP(M_XORHI, RI10, 0x228, "xorhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* XOR%I RT<-RA^I10 */ 21362306a36Sopenharmony_ciAPUOP(M_XORI, RI10, 0x220, "xori", _A3(A_T,A_A,A_S10), 00012, FX2) /* XOR%I RT<-RA^I10 */ 21462306a36Sopenharmony_ciAPUOP(M_AHI, RI10, 0x0e8, "ahi", _A3(A_T,A_A,A_S10), 00012, FX2) /* Add%Immed RT<-RA+I10 */ 21562306a36Sopenharmony_ciAPUOP(M_AI, RI10, 0x0e0, "ai", _A3(A_T,A_A,A_S10), 00012, FX2) /* Add%Immed RT<-RA+I10 */ 21662306a36Sopenharmony_ciAPUOP(M_SFHI, RI10, 0x068, "sfhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* SubFrom%Imm RT<-I10-RA */ 21762306a36Sopenharmony_ciAPUOP(M_SFI, RI10, 0x060, "sfi", _A3(A_T,A_A,A_S10), 00012, FX2) /* SubFrom%Imm RT<-I10-RA */ 21862306a36Sopenharmony_ciAPUOP(M_CGTBI, RI10, 0x270, "cgtbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CGT%I RT<-(RA>I10) */ 21962306a36Sopenharmony_ciAPUOP(M_CGTHI, RI10, 0x268, "cgthi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CGT%I RT<-(RA>I10) */ 22062306a36Sopenharmony_ciAPUOP(M_CGTI, RI10, 0x260, "cgti", _A3(A_T,A_A,A_S10), 00012, FX2) /* CGT%I RT<-(RA>I10) */ 22162306a36Sopenharmony_ciAPUOP(M_CLGTBI, RI10, 0x2f0, "clgtbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CLGT%I RT<-(RA>I10) */ 22262306a36Sopenharmony_ciAPUOP(M_CLGTHI, RI10, 0x2e8, "clgthi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CLGT%I RT<-(RA>I10) */ 22362306a36Sopenharmony_ciAPUOP(M_CLGTI, RI10, 0x2e0, "clgti", _A3(A_T,A_A,A_S10), 00012, FX2) /* CLGT%I RT<-(RA>I10) */ 22462306a36Sopenharmony_ciAPUOP(M_CEQBI, RI10, 0x3f0, "ceqbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CEQ%I RT<-(RA=I10) */ 22562306a36Sopenharmony_ciAPUOP(M_CEQHI, RI10, 0x3e8, "ceqhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CEQ%I RT<-(RA=I10) */ 22662306a36Sopenharmony_ciAPUOP(M_CEQI, RI10, 0x3e0, "ceqi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CEQ%I RT<-(RA=I10) */ 22762306a36Sopenharmony_ciAPUOP(M_HGTI, RI10, 0x278, "hgti", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltGTI halt_if(RA>I10) */ 22862306a36Sopenharmony_ciAPUOP(M_HGTI2, RI10, 0x278, "hgti", _A2(A_A,A_S10), 00010, FX2) /* HaltGTI halt_if(RA>I10) */ 22962306a36Sopenharmony_ciAPUOP(M_HLGTI, RI10, 0x2f8, "hlgti", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltLGTI halt_if(RA>I10) */ 23062306a36Sopenharmony_ciAPUOP(M_HLGTI2, RI10, 0x2f8, "hlgti", _A2(A_A,A_S10), 00010, FX2) /* HaltLGTI halt_if(RA>I10) */ 23162306a36Sopenharmony_ciAPUOP(M_HEQI, RI10, 0x3f8, "heqi", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltEQImm halt_if(RA=I10) */ 23262306a36Sopenharmony_ciAPUOP(M_HEQI2, RI10, 0x3f8, "heqi", _A2(A_A,A_S10), 00010, FX2) /* HaltEQImm halt_if(RA=I10) */ 23362306a36Sopenharmony_ciAPUOP(M_MPYI, RI10, 0x3a0, "mpyi", _A3(A_T,A_A,A_S10), 00012, FP7) /* MPYI RT<-RA*I10 */ 23462306a36Sopenharmony_ciAPUOP(M_MPYUI, RI10, 0x3a8, "mpyui", _A3(A_T,A_A,A_S10), 00012, FP7) /* MPYUI RT<-RA*I10 */ 23562306a36Sopenharmony_ciAPUOP(M_CFLTS, RI8, 0x3b0, "cflts", _A3(A_T,A_A,A_U7A), 00012, FP7) /* CFLTS RT<-int(RA,I8) */ 23662306a36Sopenharmony_ciAPUOP(M_CFLTU, RI8, 0x3b2, "cfltu", _A3(A_T,A_A,A_U7A), 00012, FP7) /* CFLTU RT<-int(RA,I8) */ 23762306a36Sopenharmony_ciAPUOP(M_CSFLT, RI8, 0x3b4, "csflt", _A3(A_T,A_A,A_U7B), 00012, FP7) /* CSFLT RT<-flt(RA,I8) */ 23862306a36Sopenharmony_ciAPUOP(M_CUFLT, RI8, 0x3b6, "cuflt", _A3(A_T,A_A,A_U7B), 00012, FP7) /* CUFLT RT<-flt(RA,I8) */ 23962306a36Sopenharmony_ciAPUOP(M_FESD, RR, 0x3b8, "fesd", _A2(A_T,A_A), 00012, FPD) /* FESD RT<-double(RA) */ 24062306a36Sopenharmony_ciAPUOP(M_FRDS, RR, 0x3b9, "frds", _A2(A_T,A_A), 00012, FPD) /* FRDS RT<-single(RA) */ 24162306a36Sopenharmony_ciAPUOP(M_FSCRRD, RR, 0x398, "fscrrd", _A1(A_T), 00002, FPD) /* FSCRRD RT<-FP_status */ 24262306a36Sopenharmony_ciAPUOP(M_FSCRWR, RR, 0x3ba, "fscrwr", _A2(A_T,A_A), 00010, FP7) /* FSCRWR FP_status<-RA */ 24362306a36Sopenharmony_ciAPUOP(M_FSCRWR2, RR, 0x3ba, "fscrwr", _A1(A_A), 00010, FP7) /* FSCRWR FP_status<-RA */ 24462306a36Sopenharmony_ciAPUOP(M_CLZ, RR, 0x2a5, "clz", _A2(A_T,A_A), 00012, FX2) /* CLZ RT<-clz(RA) */ 24562306a36Sopenharmony_ciAPUOP(M_CNTB, RR, 0x2b4, "cntb", _A2(A_T,A_A), 00012, FXB) /* CNT RT<-pop(RA) */ 24662306a36Sopenharmony_ciAPUOP(M_XSBH, RR, 0x2b6, "xsbh", _A2(A_T,A_A), 00012, FX2) /* eXtSignBtoH RT<-sign_ext(RA) */ 24762306a36Sopenharmony_ciAPUOP(M_XSHW, RR, 0x2ae, "xshw", _A2(A_T,A_A), 00012, FX2) /* eXtSignHtoW RT<-sign_ext(RA) */ 24862306a36Sopenharmony_ciAPUOP(M_XSWD, RR, 0x2a6, "xswd", _A2(A_T,A_A), 00012, FX2) /* eXtSignWtoD RT<-sign_ext(RA) */ 24962306a36Sopenharmony_ciAPUOP(M_ROTI, RI7, 0x078, "roti", _A3(A_T,A_A,A_S7N), 00012, FX3) /* ROT%I RT<-RA<<<I7 */ 25062306a36Sopenharmony_ciAPUOP(M_ROTMI, RI7, 0x079, "rotmi", _A3(A_T,A_A,A_S7), 00012, FX3) /* ROT%MI RT<-RA<<I7 */ 25162306a36Sopenharmony_ciAPUOP(M_ROTMAI, RI7, 0x07a, "rotmai", _A3(A_T,A_A,A_S7), 00012, FX3) /* ROTMA%I RT<-RA<<I7 */ 25262306a36Sopenharmony_ciAPUOP(M_SHLI, RI7, 0x07b, "shli", _A3(A_T,A_A,A_U6), 00012, FX3) /* SHL%I RT<-RA<<I7 */ 25362306a36Sopenharmony_ciAPUOP(M_ROTHI, RI7, 0x07c, "rothi", _A3(A_T,A_A,A_S7N), 00012, FX3) /* ROT%I RT<-RA<<<I7 */ 25462306a36Sopenharmony_ciAPUOP(M_ROTHMI, RI7, 0x07d, "rothmi", _A3(A_T,A_A,A_S6), 00012, FX3) /* ROT%MI RT<-RA<<I7 */ 25562306a36Sopenharmony_ciAPUOP(M_ROTMAHI, RI7, 0x07e, "rotmahi", _A3(A_T,A_A,A_S6), 00012, FX3) /* ROTMA%I RT<-RA<<I7 */ 25662306a36Sopenharmony_ciAPUOP(M_SHLHI, RI7, 0x07f, "shlhi", _A3(A_T,A_A,A_U5), 00012, FX3) /* SHL%I RT<-RA<<I7 */ 25762306a36Sopenharmony_ciAPUOP(M_A, RR, 0x0c0, "a", _A3(A_T,A_A,A_B), 00112, FX2) /* Add% RT<-RA+RB */ 25862306a36Sopenharmony_ciAPUOP(M_AH, RR, 0x0c8, "ah", _A3(A_T,A_A,A_B), 00112, FX2) /* Add% RT<-RA+RB */ 25962306a36Sopenharmony_ciAPUOP(M_SF, RR, 0x040, "sf", _A3(A_T,A_A,A_B), 00112, FX2) /* SubFrom% RT<-RB-RA */ 26062306a36Sopenharmony_ciAPUOP(M_SFH, RR, 0x048, "sfh", _A3(A_T,A_A,A_B), 00112, FX2) /* SubFrom% RT<-RB-RA */ 26162306a36Sopenharmony_ciAPUOP(M_CGT, RR, 0x240, "cgt", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */ 26262306a36Sopenharmony_ciAPUOP(M_CGTB, RR, 0x250, "cgtb", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */ 26362306a36Sopenharmony_ciAPUOP(M_CGTH, RR, 0x248, "cgth", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */ 26462306a36Sopenharmony_ciAPUOP(M_CLGT, RR, 0x2c0, "clgt", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */ 26562306a36Sopenharmony_ciAPUOP(M_CLGTB, RR, 0x2d0, "clgtb", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */ 26662306a36Sopenharmony_ciAPUOP(M_CLGTH, RR, 0x2c8, "clgth", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */ 26762306a36Sopenharmony_ciAPUOP(M_CEQ, RR, 0x3c0, "ceq", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */ 26862306a36Sopenharmony_ciAPUOP(M_CEQB, RR, 0x3d0, "ceqb", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */ 26962306a36Sopenharmony_ciAPUOP(M_CEQH, RR, 0x3c8, "ceqh", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */ 27062306a36Sopenharmony_ciAPUOP(M_HGT, RR, 0x258, "hgt", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltGT halt_if(RA>RB) */ 27162306a36Sopenharmony_ciAPUOP(M_HGT2, RR, 0x258, "hgt", _A2(A_A,A_B), 00110, FX2) /* HaltGT halt_if(RA>RB) */ 27262306a36Sopenharmony_ciAPUOP(M_HLGT, RR, 0x2d8, "hlgt", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltLGT halt_if(RA>RB) */ 27362306a36Sopenharmony_ciAPUOP(M_HLGT2, RR, 0x2d8, "hlgt", _A2(A_A,A_B), 00110, FX2) /* HaltLGT halt_if(RA>RB) */ 27462306a36Sopenharmony_ciAPUOP(M_HEQ, RR, 0x3d8, "heq", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltEQ halt_if(RA=RB) */ 27562306a36Sopenharmony_ciAPUOP(M_HEQ2, RR, 0x3d8, "heq", _A2(A_A,A_B), 00110, FX2) /* HaltEQ halt_if(RA=RB) */ 27662306a36Sopenharmony_ciAPUOP(M_FCEQ, RR, 0x3c2, "fceq", _A3(A_T,A_A,A_B), 00112, FX2) /* FCEQ RT<-(RA=RB) */ 27762306a36Sopenharmony_ciAPUOP(M_FCMEQ, RR, 0x3ca, "fcmeq", _A3(A_T,A_A,A_B), 00112, FX2) /* FCMEQ RT<-(|RA|=|RB|) */ 27862306a36Sopenharmony_ciAPUOP(M_FCGT, RR, 0x2c2, "fcgt", _A3(A_T,A_A,A_B), 00112, FX2) /* FCGT RT<-(RA<RB) */ 27962306a36Sopenharmony_ciAPUOP(M_FCMGT, RR, 0x2ca, "fcmgt", _A3(A_T,A_A,A_B), 00112, FX2) /* FCMGT RT<-(|RA|<|RB|) */ 28062306a36Sopenharmony_ciAPUOP(M_AND, RR, 0x0c1, "and", _A3(A_T,A_A,A_B), 00112, FX2) /* AND RT<-RA&RB */ 28162306a36Sopenharmony_ciAPUOP(M_NAND, RR, 0x0c9, "nand", _A3(A_T,A_A,A_B), 00112, FX2) /* NAND RT<-!(RA&RB) */ 28262306a36Sopenharmony_ciAPUOP(M_OR, RR, 0x041, "or", _A3(A_T,A_A,A_B), 00112, FX2) /* OR RT<-RA|RB */ 28362306a36Sopenharmony_ciAPUOP(M_NOR, RR, 0x049, "nor", _A3(A_T,A_A,A_B), 00112, FX2) /* NOR RT<-!(RA&RB) */ 28462306a36Sopenharmony_ciAPUOP(M_XOR, RR, 0x241, "xor", _A3(A_T,A_A,A_B), 00112, FX2) /* XOR RT<-RA^RB */ 28562306a36Sopenharmony_ciAPUOP(M_EQV, RR, 0x249, "eqv", _A3(A_T,A_A,A_B), 00112, FX2) /* EQuiValent RT<-!(RA^RB) */ 28662306a36Sopenharmony_ciAPUOP(M_ANDC, RR, 0x2c1, "andc", _A3(A_T,A_A,A_B), 00112, FX2) /* ANDComplement RT<-RA&!RB */ 28762306a36Sopenharmony_ciAPUOP(M_ORC, RR, 0x2c9, "orc", _A3(A_T,A_A,A_B), 00112, FX2) /* ORComplement RT<-RA|!RB */ 28862306a36Sopenharmony_ciAPUOP(M_ABSDB, RR, 0x053, "absdb", _A3(A_T,A_A,A_B), 00112, FXB) /* ABSoluteDiff RT<-|RA-RB| */ 28962306a36Sopenharmony_ciAPUOP(M_AVGB, RR, 0x0d3, "avgb", _A3(A_T,A_A,A_B), 00112, FXB) /* AVG% RT<-(RA+RB+1)/2 */ 29062306a36Sopenharmony_ciAPUOP(M_SUMB, RR, 0x253, "sumb", _A3(A_T,A_A,A_B), 00112, FXB) /* SUM% RT<-f(RA,RB) */ 29162306a36Sopenharmony_ciAPUOP(M_DFA, RR, 0x2cc, "dfa", _A3(A_T,A_A,A_B), 00112, FPD) /* DFAdd RT<-RA+RB */ 29262306a36Sopenharmony_ciAPUOP(M_DFM, RR, 0x2ce, "dfm", _A3(A_T,A_A,A_B), 00112, FPD) /* DFMul RT<-RA*RB */ 29362306a36Sopenharmony_ciAPUOP(M_DFS, RR, 0x2cd, "dfs", _A3(A_T,A_A,A_B), 00112, FPD) /* DFSub RT<-RA-RB */ 29462306a36Sopenharmony_ciAPUOP(M_FA, RR, 0x2c4, "fa", _A3(A_T,A_A,A_B), 00112, FP6) /* FAdd RT<-RA+RB */ 29562306a36Sopenharmony_ciAPUOP(M_FM, RR, 0x2c6, "fm", _A3(A_T,A_A,A_B), 00112, FP6) /* FMul RT<-RA*RB */ 29662306a36Sopenharmony_ciAPUOP(M_FS, RR, 0x2c5, "fs", _A3(A_T,A_A,A_B), 00112, FP6) /* FSub RT<-RA-RB */ 29762306a36Sopenharmony_ciAPUOP(M_MPY, RR, 0x3c4, "mpy", _A3(A_T,A_A,A_B), 00112, FP7) /* MPY RT<-RA*RB */ 29862306a36Sopenharmony_ciAPUOP(M_MPYH, RR, 0x3c5, "mpyh", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYH RT<-(RAh*RB)<<16 */ 29962306a36Sopenharmony_ciAPUOP(M_MPYHH, RR, 0x3c6, "mpyhh", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYHH RT<-RAh*RBh */ 30062306a36Sopenharmony_ciAPUOP(M_MPYHHU, RR, 0x3ce, "mpyhhu", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYHHU RT<-RAh*RBh */ 30162306a36Sopenharmony_ciAPUOP(M_MPYS, RR, 0x3c7, "mpys", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYS RT<-(RA*RB)>>16 */ 30262306a36Sopenharmony_ciAPUOP(M_MPYU, RR, 0x3cc, "mpyu", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYU RT<-RA*RB */ 30362306a36Sopenharmony_ciAPUOP(M_FI, RR, 0x3d4, "fi", _A3(A_T,A_A,A_B), 00112, FP7) /* FInterpolate RT<-f(RA,RB) */ 30462306a36Sopenharmony_ciAPUOP(M_ROT, RR, 0x058, "rot", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT% RT<-RA<<<RB */ 30562306a36Sopenharmony_ciAPUOP(M_ROTM, RR, 0x059, "rotm", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT%M RT<-RA<<Rb */ 30662306a36Sopenharmony_ciAPUOP(M_ROTMA, RR, 0x05a, "rotma", _A3(A_T,A_A,A_B), 00112, FX3) /* ROTMA% RT<-RA<<Rb */ 30762306a36Sopenharmony_ciAPUOP(M_SHL, RR, 0x05b, "shl", _A3(A_T,A_A,A_B), 00112, FX3) /* SHL% RT<-RA<<Rb */ 30862306a36Sopenharmony_ciAPUOP(M_ROTH, RR, 0x05c, "roth", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT% RT<-RA<<<RB */ 30962306a36Sopenharmony_ciAPUOP(M_ROTHM, RR, 0x05d, "rothm", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT%M RT<-RA<<Rb */ 31062306a36Sopenharmony_ciAPUOP(M_ROTMAH, RR, 0x05e, "rotmah", _A3(A_T,A_A,A_B), 00112, FX3) /* ROTMA% RT<-RA<<Rb */ 31162306a36Sopenharmony_ciAPUOP(M_SHLH, RR, 0x05f, "shlh", _A3(A_T,A_A,A_B), 00112, FX3) /* SHL% RT<-RA<<Rb */ 31262306a36Sopenharmony_ciAPUOP(M_MPYHHA, RR, 0x346, "mpyhha", _A3(A_T,A_A,A_B), 00113, FP7) /* MPYHHA RT<-RAh*RBh+RT */ 31362306a36Sopenharmony_ciAPUOP(M_MPYHHAU, RR, 0x34e, "mpyhhau", _A3(A_T,A_A,A_B), 00113, FP7) /* MPYHHAU RT<-RAh*RBh+RT */ 31462306a36Sopenharmony_ciAPUOP(M_DFMA, RR, 0x35c, "dfma", _A3(A_T,A_A,A_B), 00113, FPD) /* DFMAdd RT<-RT+RA*RB */ 31562306a36Sopenharmony_ciAPUOP(M_DFMS, RR, 0x35d, "dfms", _A3(A_T,A_A,A_B), 00113, FPD) /* DFMSub RT<-RA*RB-RT */ 31662306a36Sopenharmony_ciAPUOP(M_DFNMS, RR, 0x35e, "dfnms", _A3(A_T,A_A,A_B), 00113, FPD) /* DFNMSub RT<-RT-RA*RB */ 31762306a36Sopenharmony_ciAPUOP(M_DFNMA, RR, 0x35f, "dfnma", _A3(A_T,A_A,A_B), 00113, FPD) /* DFNMAdd RT<-(-RT)-RA*RB */ 31862306a36Sopenharmony_ciAPUOP(M_FMA, RRR, 0x700, "fma", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FMAdd RC<-RT+RA*RB */ 31962306a36Sopenharmony_ciAPUOP(M_FMS, RRR, 0x780, "fms", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FMSub RC<-RA*RB-RT */ 32062306a36Sopenharmony_ciAPUOP(M_FNMS, RRR, 0x680, "fnms", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FNMSub RC<-RT-RA*RB */ 32162306a36Sopenharmony_ciAPUOP(M_MPYA, RRR, 0x600, "mpya", _A4(A_C,A_A,A_B,A_T), 02111, FP7) /* MPYA RC<-RA*RB+RT */ 32262306a36Sopenharmony_ciAPUOP(M_SELB, RRR, 0x400, "selb", _A4(A_C,A_A,A_B,A_T), 02111, FX2) /* SELectBits RC<-RA&RT|RB&!RT */ 32362306a36Sopenharmony_ci/* for system function call, this uses op-code of mtspr */ 32462306a36Sopenharmony_ciAPUOP(M_SYSCALL, RI7, 0x10c, "syscall", _A3(A_T,A_A,A_S7N), 00002, SPR) /* System Call */ 32562306a36Sopenharmony_ci/* 32662306a36Sopenharmony_cipseudo instruction: 32762306a36Sopenharmony_cisystem call 32862306a36Sopenharmony_civalue of I9 operation 32962306a36Sopenharmony_ci0 halt 33062306a36Sopenharmony_ci1 rt[0] = open(MEM[ra[0]], ra[1]) 33162306a36Sopenharmony_ci2 rt[0] = close(ra[0]) 33262306a36Sopenharmony_ci3 rt[0] = read(ra[0], MEM[ra[1]], ra[2]) 33362306a36Sopenharmony_ci4 rt[0] = write(ra[0], MEM[ra[1]], ra[2]) 33462306a36Sopenharmony_ci5 printf(MEM[ra[0]], ra[1], ra[2], ra[3]) 33562306a36Sopenharmony_ci42 rt[0] = clock() 33662306a36Sopenharmony_ci52 rt[0] = lseek(ra0, ra1, ra2) 33762306a36Sopenharmony_ci 33862306a36Sopenharmony_ci*/ 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_ci 34162306a36Sopenharmony_ci/* new multiprecision add/sub */ 34262306a36Sopenharmony_ciAPUOP(M_ADDX, RR, 0x340, "addx", _A3(A_T,A_A,A_B), 00113, FX2) /* Add_eXtended RT<-RA+RB+RT */ 34362306a36Sopenharmony_ciAPUOP(M_CG, RR, 0x0c2, "cg", _A3(A_T,A_A,A_B), 00112, FX2) /* CarryGenerate RT<-cout(RA+RB) */ 34462306a36Sopenharmony_ciAPUOP(M_CGX, RR, 0x342, "cgx", _A3(A_T,A_A,A_B), 00113, FX2) /* CarryGen_eXtd RT<-cout(RA+RB+RT) */ 34562306a36Sopenharmony_ciAPUOP(M_SFX, RR, 0x341, "sfx", _A3(A_T,A_A,A_B), 00113, FX2) /* Add_eXtended RT<-RA+RB+RT */ 34662306a36Sopenharmony_ciAPUOP(M_BG, RR, 0x042, "bg", _A3(A_T,A_A,A_B), 00112, FX2) /* CarryGenerate RT<-cout(RA+RB) */ 34762306a36Sopenharmony_ciAPUOP(M_BGX, RR, 0x343, "bgx", _A3(A_T,A_A,A_B), 00113, FX2) /* CarryGen_eXtd RT<-cout(RA+RB+RT) */ 34862306a36Sopenharmony_ci 34962306a36Sopenharmony_ci/* 35062306a36Sopenharmony_ci 35162306a36Sopenharmony_ciThe following ops are a subset of above except with feature bits set. 35262306a36Sopenharmony_ciFeature bits are bits 11-17 of the instruction: 35362306a36Sopenharmony_ci 35462306a36Sopenharmony_ci 11 - C & P feature bit 35562306a36Sopenharmony_ci 12 - disable interrupts 35662306a36Sopenharmony_ci 13 - enable interrupts 35762306a36Sopenharmony_ci 35862306a36Sopenharmony_ci*/ 35962306a36Sopenharmony_ciAPUOPFB(M_BID, RR, 0x1a8, 0x20, "bid", _A1(A_A), 00010, BR) /* BI IP<-RA */ 36062306a36Sopenharmony_ciAPUOPFB(M_BIE, RR, 0x1a8, 0x10, "bie", _A1(A_A), 00010, BR) /* BI IP<-RA */ 36162306a36Sopenharmony_ciAPUOPFB(M_BISLD, RR, 0x1a9, 0x20, "bisld", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */ 36262306a36Sopenharmony_ciAPUOPFB(M_BISLE, RR, 0x1a9, 0x10, "bisle", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */ 36362306a36Sopenharmony_ciAPUOPFB(M_IRETD, RR, 0x1aa, 0x20, "iretd", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */ 36462306a36Sopenharmony_ciAPUOPFB(M_IRETD2, RR, 0x1aa, 0x20, "iretd", _A0(), 00010, BR) /* IRET IP<-SRR0 */ 36562306a36Sopenharmony_ciAPUOPFB(M_IRETE, RR, 0x1aa, 0x10, "irete", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */ 36662306a36Sopenharmony_ciAPUOPFB(M_IRETE2, RR, 0x1aa, 0x10, "irete", _A0(), 00010, BR) /* IRET IP<-SRR0 */ 36762306a36Sopenharmony_ciAPUOPFB(M_BISLEDD, RR, 0x1ab, 0x20, "bisledd", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */ 36862306a36Sopenharmony_ciAPUOPFB(M_BISLEDE, RR, 0x1ab, 0x10, "bislede", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */ 36962306a36Sopenharmony_ciAPUOPFB(M_BIHNZD, RR, 0x12b, 0x20, "bihnzd", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */ 37062306a36Sopenharmony_ciAPUOPFB(M_BIHNZE, RR, 0x12b, 0x10, "bihnze", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */ 37162306a36Sopenharmony_ciAPUOPFB(M_BIHZD, RR, 0x12a, 0x20, "bihzd", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */ 37262306a36Sopenharmony_ciAPUOPFB(M_BIHZE, RR, 0x12a, 0x10, "bihze", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */ 37362306a36Sopenharmony_ciAPUOPFB(M_BINZD, RR, 0x129, 0x20, "binzd", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */ 37462306a36Sopenharmony_ciAPUOPFB(M_BINZE, RR, 0x129, 0x10, "binze", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */ 37562306a36Sopenharmony_ciAPUOPFB(M_BIZD, RR, 0x128, 0x20, "bizd", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */ 37662306a36Sopenharmony_ciAPUOPFB(M_BIZE, RR, 0x128, 0x10, "bize", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */ 37762306a36Sopenharmony_ciAPUOPFB(M_SYNCC, RR, 0x002, 0x40, "syncc", _A0(), 00000, BR) /* SYNCC flush_pipe */ 37862306a36Sopenharmony_ciAPUOPFB(M_HBRP, LBTI, 0x1ac, 0x40, "hbrp", _A0(), 00010, LS) /* HBR BTB[B9]<-M[Ra] */ 37962306a36Sopenharmony_ci 38062306a36Sopenharmony_ci/* Synonyms required by the AS manual. */ 38162306a36Sopenharmony_ciAPUOP(M_LR, RI10, 0x020, "lr", _A2(A_T,A_A), 00012, FX2) /* OR%I RT<-RA|I10 */ 38262306a36Sopenharmony_ciAPUOP(M_BIHT, RR, 0x12b, "biht", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */ 38362306a36Sopenharmony_ciAPUOP(M_BIHF, RR, 0x12a, "bihf", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */ 38462306a36Sopenharmony_ciAPUOP(M_BIT, RR, 0x129, "bit", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */ 38562306a36Sopenharmony_ciAPUOP(M_BIF, RR, 0x128, "bif", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */ 38662306a36Sopenharmony_ciAPUOPFB(M_BIHTD, RR, 0x12b, 0x20, "bihtd", _A2(A_T,A_A), 00011, BR) /* BIHNF IP<-RA_if(RT) */ 38762306a36Sopenharmony_ciAPUOPFB(M_BIHTE, RR, 0x12b, 0x10, "bihte", _A2(A_T,A_A), 00011, BR) /* BIHNF IP<-RA_if(RT) */ 38862306a36Sopenharmony_ciAPUOPFB(M_BIHFD, RR, 0x12a, 0x20, "bihfd", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */ 38962306a36Sopenharmony_ciAPUOPFB(M_BIHFE, RR, 0x12a, 0x10, "bihfe", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */ 39062306a36Sopenharmony_ciAPUOPFB(M_BITD, RR, 0x129, 0x20, "bitd", _A2(A_T,A_A), 00011, BR) /* BINF IP<-RA_if(RT) */ 39162306a36Sopenharmony_ciAPUOPFB(M_BITE, RR, 0x129, 0x10, "bite", _A2(A_T,A_A), 00011, BR) /* BINF IP<-RA_if(RT) */ 39262306a36Sopenharmony_ciAPUOPFB(M_BIFD, RR, 0x128, 0x20, "bifd", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */ 39362306a36Sopenharmony_ciAPUOPFB(M_BIFE, RR, 0x128, 0x10, "bife", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */ 39462306a36Sopenharmony_ci 39562306a36Sopenharmony_ci#undef _A0 39662306a36Sopenharmony_ci#undef _A1 39762306a36Sopenharmony_ci#undef _A2 39862306a36Sopenharmony_ci#undef _A3 39962306a36Sopenharmony_ci#undef _A4 400