diff options
author | Andrew Waterman <andrew@sifive.com> | 2024-05-01 16:25:46 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2024-05-01 16:53:06 -0700 |
commit | c9468f6e024abb6d620ace295ef6e2e58e8f7eb2 (patch) | |
tree | 9be4f9d3cbe9ff9321d64109be58b3a0ba605654 /riscv/insns | |
parent | c4edeabbe756b2527a63970492dfb2239953a990 (diff) | |
download | riscv-isa-sim-c9468f6e024abb6d620ace295ef6e2e58e8f7eb2.zip riscv-isa-sim-c9468f6e024abb6d620ace295ef6e2e58e8f7eb2.tar.gz riscv-isa-sim-c9468f6e024abb6d620ace295ef6e2e58e8f7eb2.tar.bz2 |
Remove Zbpbo, Zpn, and Zpsfoperand implementation
Diffstat (limited to 'riscv/insns')
326 files changed, 4 insertions, 2153 deletions
diff --git a/riscv/insns/add16.h b/riscv/insns/add16.h deleted file mode 100644 index fae4316..0000000 --- a/riscv/insns/add16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(16, { - pd = ps1 + ps2; -}) diff --git a/riscv/insns/add32.h b/riscv/insns/add32.h deleted file mode 100644 index ca544ce..0000000 --- a/riscv/insns/add32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_LOOP(32, { - pd = ps1 + ps2; -}) diff --git a/riscv/insns/add64.h b/riscv/insns/add64.h deleted file mode 100644 index 0968656..0000000 --- a/riscv/insns/add64.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_PROFILE({ - rd = rs1 + rs2; -}) diff --git a/riscv/insns/add8.h b/riscv/insns/add8.h deleted file mode 100644 index bb54a7b..0000000 --- a/riscv/insns/add8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(8, { - pd = ps1 + ps2; -}) diff --git a/riscv/insns/ave.h b/riscv/insns/ave.h deleted file mode 100644 index 5997900..0000000 --- a/riscv/insns/ave.h +++ /dev/null @@ -1,5 +0,0 @@ -require_extension(EXT_ZPN); -sreg_t rs1 = RS1; -sreg_t rs2 = RS2; -sreg_t carry = (rs1 & 1) | (rs2 & 1); -WRITE_RD(sext_xlen((rs1 >> 1) + (rs2 >> 1) + carry)); diff --git a/riscv/insns/clo16.h b/riscv/insns/clo16.h deleted file mode 100644 index 9da6599..0000000 --- a/riscv/insns/clo16.h +++ /dev/null @@ -1,11 +0,0 @@ -P_ONE_LOOP(16, { - pd = 0; - ps1 = ~ps1; - if (!ps1) pd = 16; - else { - if ((ps1 & 0xFF00) == 0) { pd += 8; ps1 <<= 8; } - if ((ps1 & 0xF000) == 0) { pd += 4; ps1 <<= 4; } - if ((ps1 & 0xC000) == 0) { pd += 2; ps1 <<= 2; } - if ((ps1 & 0x8000) == 0) { pd += 1; } - } -}) diff --git a/riscv/insns/clo32.h b/riscv/insns/clo32.h deleted file mode 100644 index 431bb0e..0000000 --- a/riscv/insns/clo32.h +++ /dev/null @@ -1,12 +0,0 @@ -P_ONE_LOOP(32, { - pd = 0; - ps1 = ~ps1; - if (!ps1) pd = 32; - else { - if ((ps1 & 0xFFFF0000) == 0) { pd += 16; ps1 <<= 16; } - if ((ps1 & 0xFF000000) == 0) { pd += 8; ps1 <<= 8; } - if ((ps1 & 0xF0000000) == 0) { pd += 4; ps1 <<= 4; } - if ((ps1 & 0xC0000000) == 0) { pd += 2; ps1 <<= 2; } - if ((ps1 & 0x80000000) == 0) { pd += 1; } - } -}) diff --git a/riscv/insns/clo8.h b/riscv/insns/clo8.h deleted file mode 100644 index 2581ade..0000000 --- a/riscv/insns/clo8.h +++ /dev/null @@ -1,10 +0,0 @@ -P_ONE_LOOP(8, { - pd = 0; - ps1 = ~ps1; - if (!ps1) pd = 8; - else { - if ((ps1 & 0xF0) == 0) { pd += 4; ps1 <<= 4; } - if ((ps1 & 0xC0) == 0) { pd += 2; ps1 <<= 2; } - if ((ps1 & 0x80) == 0) { pd += 1; } - } -}) diff --git a/riscv/insns/clrs16.h b/riscv/insns/clrs16.h deleted file mode 100644 index 6541262..0000000 --- a/riscv/insns/clrs16.h +++ /dev/null @@ -1,12 +0,0 @@ -P_ONE_LOOP(16, { - pd = 0; - if (ps1 < 0) ps1 = ~ps1; - if (!ps1) pd = 16; - else { - if ((ps1 & 0xFF00) == 0) { pd += 8; ps1 <<= 8; } - if ((ps1 & 0xF000) == 0) { pd += 4; ps1 <<= 4; } - if ((ps1 & 0xC000) == 0) { pd += 2; ps1 <<= 2; } - if ((ps1 & 0x8000) == 0) { pd += 1; } - } - pd -= 1; -}) diff --git a/riscv/insns/clrs32.h b/riscv/insns/clrs32.h deleted file mode 100644 index c75db18..0000000 --- a/riscv/insns/clrs32.h +++ /dev/null @@ -1,13 +0,0 @@ -P_ONE_LOOP(32, { - pd = 0; - if (ps1 < 0) ps1 = ~ps1; - if (!ps1) pd = 32; - else { - if ((ps1 & 0xFFFF0000) == 0) { pd += 16; ps1 <<= 16; } - if ((ps1 & 0xFF000000) == 0) { pd += 8; ps1 <<= 8; } - if ((ps1 & 0xF0000000) == 0) { pd += 4; ps1 <<= 4; } - if ((ps1 & 0xC0000000) == 0) { pd += 2; ps1 <<= 2; } - if ((ps1 & 0x80000000) == 0) { pd += 1; } - } - pd -= 1; -}) diff --git a/riscv/insns/clrs8.h b/riscv/insns/clrs8.h deleted file mode 100644 index f6f8298..0000000 --- a/riscv/insns/clrs8.h +++ /dev/null @@ -1,11 +0,0 @@ -P_ONE_LOOP(8, { - pd = 0; - if (ps1 < 0) ps1 = ~ps1; - if (!ps1) pd = 8; - else { - if ((ps1 & 0xF0) == 0) { pd += 4; ps1 <<= 4; } - if ((ps1 & 0xC0) == 0) { pd += 2; ps1 <<= 2; } - if ((ps1 & 0x80) == 0) { pd += 1; } - } - pd -= 1; -}) diff --git a/riscv/insns/clz.h b/riscv/insns/clz.h index e10e4d2..d334e40 100644 --- a/riscv/insns/clz.h +++ b/riscv/insns/clz.h @@ -1,4 +1,4 @@ -require_either_extension(xlen == 32 ? EXT_ZBPBO : EXT_ZBB, EXT_ZBB); +require_extension(EXT_ZBB); reg_t x = xlen; for (int i = 0; i < xlen; i++) if (1 & (RS1 >> (xlen-i-1))) { x = i; break; } diff --git a/riscv/insns/clz16.h b/riscv/insns/clz16.h deleted file mode 100644 index a129d59..0000000 --- a/riscv/insns/clz16.h +++ /dev/null @@ -1,10 +0,0 @@ -P_ONE_LOOP(16, { - pd = 0; - if (ps1 == 0) pd = 16; - else { - if ((ps1 & 0xFF00) == 0) { pd += 8; ps1 <<= 8; } - if ((ps1 & 0xF000) == 0) { pd += 4; ps1 <<= 4; } - if ((ps1 & 0xC000) == 0) { pd += 2; ps1 <<= 2; } - if ((ps1 & 0x8000) == 0) { pd += 1; } - } -}) diff --git a/riscv/insns/clz32.h b/riscv/insns/clz32.h deleted file mode 100644 index a38dda7..0000000 --- a/riscv/insns/clz32.h +++ /dev/null @@ -1,12 +0,0 @@ -require_rv64; -P_ONE_LOOP(32, { - pd = 0; - if (ps1 == 0) pd = 32; - else { - if ((ps1 & 0xFFFF0000) == 0) { pd += 16; ps1 <<= 16; } - if ((ps1 & 0xFF000000) == 0) { pd += 8; ps1 <<= 8; } - if ((ps1 & 0xF0000000) == 0) { pd += 4; ps1 <<= 4; } - if ((ps1 & 0xC0000000) == 0) { pd += 2; ps1 <<= 2; } - if ((ps1 & 0x80000000) == 0) { pd += 1; } - } -}) diff --git a/riscv/insns/clz8.h b/riscv/insns/clz8.h deleted file mode 100644 index 78ff6b7..0000000 --- a/riscv/insns/clz8.h +++ /dev/null @@ -1,9 +0,0 @@ -P_ONE_LOOP(8, { - pd = 0; - if (ps1 == 0) pd = 8; - else { - if ((ps1 & 0xF0) == 0) { pd += 4; ps1 <<= 4; } - if ((ps1 & 0xC0) == 0) { pd += 2; ps1 <<= 2; } - if ((ps1 & 0x80) == 0) { pd += 1; } - } -}) diff --git a/riscv/insns/cmix.h b/riscv/insns/cmix.h deleted file mode 100644 index f3b7977..0000000 --- a/riscv/insns/cmix.h +++ /dev/null @@ -1,2 +0,0 @@ -require_extension(EXT_ZBPBO); -WRITE_RD((RS1 & RS2) | (RS3 & ~RS2)); diff --git a/riscv/insns/cmpeq16.h b/riscv/insns/cmpeq16.h deleted file mode 100644 index 4fb6faa..0000000 --- a/riscv/insns/cmpeq16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(16, { - pd = (ps1 == ps2) ? -1 : 0; -}) diff --git a/riscv/insns/cmpeq8.h b/riscv/insns/cmpeq8.h deleted file mode 100644 index fba1bf6..0000000 --- a/riscv/insns/cmpeq8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(8, { - pd = (ps1 == ps2) ? -1 : 0; -}) diff --git a/riscv/insns/cras16.h b/riscv/insns/cras16.h deleted file mode 100644 index 6717e09..0000000 --- a/riscv/insns/cras16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_CROSS_LOOP(16, { - pd = ps1 + ps2; -}, { - pd = ps1 - ps2; -}) diff --git a/riscv/insns/cras32.h b/riscv/insns/cras32.h deleted file mode 100644 index 8f53e98..0000000 --- a/riscv/insns/cras32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_CROSS_LOOP(32, { - pd = ps1 + ps2; -}, { - pd = ps1 - ps2; -}) diff --git a/riscv/insns/crsa16.h b/riscv/insns/crsa16.h deleted file mode 100644 index 2c1997a..0000000 --- a/riscv/insns/crsa16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_CROSS_LOOP(16, { - pd = ps1 - ps2; -}, { - pd = ps1 + ps2; -}) diff --git a/riscv/insns/crsa32.h b/riscv/insns/crsa32.h deleted file mode 100644 index 4290e9e..0000000 --- a/riscv/insns/crsa32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_CROSS_LOOP(32, { - pd = (int64_t)ps1 - ps2; -}, { - pd = (int64_t)ps1 + ps2; -}) diff --git a/riscv/insns/fsr.h b/riscv/insns/fsr.h deleted file mode 100644 index d94f922..0000000 --- a/riscv/insns/fsr.h +++ /dev/null @@ -1,10 +0,0 @@ -require_rv32; -require_extension(EXT_ZBPBO); -int shamt = RS2 & (2*xlen-1); -reg_t a = RS1, b = RS3; -if (shamt >= xlen) { - a = RS3, b = RS1; - shamt -= xlen; -} -int rshamt = -shamt & (xlen-1); -WRITE_RD(sext_xlen(shamt ? (b << rshamt) | (zext_xlen(a) >> shamt) : a)); diff --git a/riscv/insns/fsri.h b/riscv/insns/fsri.h deleted file mode 100644 index ced2364..0000000 --- a/riscv/insns/fsri.h +++ /dev/null @@ -1,10 +0,0 @@ -require_rv32; -require_extension(EXT_ZBPBO); -int shamt = SHAMT & (2*xlen-1); -reg_t a = RS1, b = RS3; -if (shamt >= xlen) { - a = RS3, b = RS1; - shamt -= xlen; -} -int rshamt = -shamt & (xlen-1); -WRITE_RD(sext_xlen(shamt ? (b << rshamt) | (zext_xlen(a) >> shamt) : a)); diff --git a/riscv/insns/fsrw.h b/riscv/insns/fsrw.h deleted file mode 100644 index 9471e36..0000000 --- a/riscv/insns/fsrw.h +++ /dev/null @@ -1,10 +0,0 @@ -require_rv64; -require_extension(EXT_ZBPBO); -int shamt = RS2 & 63; -reg_t a = RS1, b = RS3; -if (shamt >= 32) { - a = RS3, b = RS1; - shamt -= 32; -} -int rshamt = -shamt & 31; -WRITE_RD(sext32(shamt ? (b << rshamt) | (zext32(a) >> shamt) : a)); diff --git a/riscv/insns/grevi.h b/riscv/insns/grevi.h index c37f59b..a274cdd 100644 --- a/riscv/insns/grevi.h +++ b/riscv/insns/grevi.h @@ -2,9 +2,7 @@ // Zbkb contains rev8 and brev8 (a.k.a. rev.b) but not general grevi int shamt = SHAMT; require(((shamt == xlen - 8) && (p->extension_enabled(EXT_ZBB) || p->extension_enabled(EXT_ZBKB))) //rev8 - || ((shamt == 7) && p->extension_enabled(EXT_ZBKB)) // rev8.b - || ((shamt == 8) && p->extension_enabled(EXT_ZPN)) // rev8.h - || ((shamt == xlen - 1) && p->extension_enabled(EXT_ZPN))); + || ((shamt == 7) && p->extension_enabled(EXT_ZBKB))); // rev8.b require(shamt < xlen); reg_t x = RS1; if (shamt & 1) x = ((x & 0x5555555555555555LL) << 1) | ((x & 0xAAAAAAAAAAAAAAAALL) >> 1); diff --git a/riscv/insns/insb.h b/riscv/insns/insb.h deleted file mode 100644 index 020e905..0000000 --- a/riscv/insns/insb.h +++ /dev/null @@ -1,4 +0,0 @@ -require_extension(EXT_ZPN); -reg_t bpos = insn.p_imm3(); -require(bpos < (unsigned long)xlen/8); // imm[2] == 1 is illegal on rv32 -WRITE_RD(sext_xlen(set_field(RD, make_mask64(bpos * 8, 8), P_B(RS1, 0)))); diff --git a/riscv/insns/kabs16.h b/riscv/insns/kabs16.h deleted file mode 100644 index 8d1d9b8..0000000 --- a/riscv/insns/kabs16.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_ONE_LOOP(16, { - pd = ps1; - if (ps1 == INT16_MIN) { - pd = INT16_MAX; - P_SET_OV(1); - } else if (ps1 < 0) { - pd = - ps1; - } -}) diff --git a/riscv/insns/kabs32.h b/riscv/insns/kabs32.h deleted file mode 100644 index 0536aac..0000000 --- a/riscv/insns/kabs32.h +++ /dev/null @@ -1,11 +0,0 @@ -require_vector_vs; -require_rv64; -P_ONE_LOOP(32, { - pd = ps1; - if (ps1 == INT32_MIN) { - pd = INT32_MAX; - P_SET_OV(1); - } else if (ps1 < 0) { - pd = - ps1; - } -}) diff --git a/riscv/insns/kabs8.h b/riscv/insns/kabs8.h deleted file mode 100644 index 2e6e1f1..0000000 --- a/riscv/insns/kabs8.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_ONE_LOOP(8, { - pd = ps1; - if (ps1 == INT8_MIN) { - pd = INT8_MAX; - P_SET_OV(1); - } else if (ps1 < 0) { - pd = - ps1; - } -}) diff --git a/riscv/insns/kabsw.h b/riscv/insns/kabsw.h deleted file mode 100644 index 5e83b75..0000000 --- a/riscv/insns/kabsw.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -int32_t rs1 = P_W(RS1, 0); - -if (rs1 == INT32_MIN) { - rs1 = INT32_MAX; - P_SET_OV(1); -} - -WRITE_RD(sext_xlen(rs1 >= 0 ? rs1 : -rs1)); diff --git a/riscv/insns/kadd16.h b/riscv/insns/kadd16.h deleted file mode 100644 index b6defe1..0000000 --- a/riscv/insns/kadd16.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_LOOP(16, { - bool sat = false; - pd = (sat_add<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kadd32.h b/riscv/insns/kadd32.h deleted file mode 100644 index 1728847..0000000 --- a/riscv/insns/kadd32.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kadd64.h b/riscv/insns/kadd64.h deleted file mode 100644 index c58fff0..0000000 --- a/riscv/insns/kadd64.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_64_PROFILE({ - bool sat = false; - rd = (sat_add<int64_t, uint64_t>(rs1, rs2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kadd8.h b/riscv/insns/kadd8.h deleted file mode 100644 index 98864c7..0000000 --- a/riscv/insns/kadd8.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_LOOP(8, { - bool sat = false; - pd = (sat_add<int8_t, uint8_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kaddh.h b/riscv/insns/kaddh.h deleted file mode 100644 index 43aedb2..0000000 --- a/riscv/insns/kaddh.h +++ /dev/null @@ -1,5 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_SH(RS1, 0) + (sreg_t)P_SH(RS2, 0); -P_SAT(res, 16); -WRITE_RD(sext_xlen((int16_t)res)); diff --git a/riscv/insns/kaddw.h b/riscv/insns/kaddw.h deleted file mode 100644 index 3298d57..0000000 --- a/riscv/insns/kaddw.h +++ /dev/null @@ -1,5 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_SW(RS1, 0) + (sreg_t)P_SW(RS2, 0); -P_SAT(res, 32); -WRITE_RD(sext32(res)); diff --git a/riscv/insns/kcras16.h b/riscv/insns/kcras16.h deleted file mode 100644 index d746425..0000000 --- a/riscv/insns/kcras16.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_CROSS_ULOOP(16, { - bool sat = false; - pd = (sat_add<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_sub<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kcras32.h b/riscv/insns/kcras32.h deleted file mode 100644 index ead31f8..0000000 --- a/riscv/insns/kcras32.h +++ /dev/null @@ -1,11 +0,0 @@ -require_vector_vs; -require_rv64; -P_CROSS_ULOOP(32, { - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_sub<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kcrsa16.h b/riscv/insns/kcrsa16.h deleted file mode 100644 index 2a7ca4d..0000000 --- a/riscv/insns/kcrsa16.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_CROSS_ULOOP(16, { - bool sat = false; - pd = (sat_sub<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_add<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kcrsa32.h b/riscv/insns/kcrsa32.h deleted file mode 100644 index b688fd3..0000000 --- a/riscv/insns/kcrsa32.h +++ /dev/null @@ -1,11 +0,0 @@ -require_vector_vs; -require_rv64; -P_CROSS_ULOOP(32, { - bool sat = false; - pd = (sat_sub<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kdmabb.h b/riscv/insns/kdmabb.h deleted file mode 100644 index 7ca0563..0000000 --- a/riscv/insns/kdmabb.h +++ /dev/null @@ -1,17 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res; -sreg_t aop = P_SH(RS1, 0); -sreg_t bop = P_SH(RS2, 0); - -if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - res = aop * bop; - res <<= 1; -} else { - res = INT32_MAX; - P_SET_OV(1); -} - -res += sext32(RD); -P_SAT(res, 32); -WRITE_RD(sext32(res)); diff --git a/riscv/insns/kdmabb16.h b/riscv/insns/kdmabb16.h deleted file mode 100644 index 2ccd40b..0000000 --- a/riscv/insns/kdmabb16.h +++ /dev/null @@ -1,18 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - int32_t aop = P_SH(ps1, 0); - int32_t bop = P_SH(ps2, 0); - int32_t mres; - bool sat; - - if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - mres = aop * bop; - mres <<= 1; - } else { - mres = INT32_MAX; - P_SET_OV(1); - } - pd = (sat_add<int32_t, uint32_t>(pd, mres, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kdmabt.h b/riscv/insns/kdmabt.h deleted file mode 100644 index d50a6df..0000000 --- a/riscv/insns/kdmabt.h +++ /dev/null @@ -1,17 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res; -sreg_t aop = P_SH(RS1, 0); -sreg_t bop = P_SH(RS2, 1); - -if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - res = aop * bop; - res <<= 1; -} else { - res = INT32_MAX; - P_SET_OV(1); -} - -res += sext32(RD); -P_SAT(res, 32); -WRITE_RD(sext32(res)); diff --git a/riscv/insns/kdmabt16.h b/riscv/insns/kdmabt16.h deleted file mode 100644 index 49538b3..0000000 --- a/riscv/insns/kdmabt16.h +++ /dev/null @@ -1,18 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - int32_t aop = P_SH(ps1, 0); - int32_t bop = P_SH(ps2, 1); - int32_t mres; - bool sat; - - if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - mres = aop * bop; - mres <<= 1; - } else { - mres = INT32_MAX; - P_SET_OV(1); - } - pd = (sat_add<int32_t, uint32_t>(pd, mres, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kdmatt.h b/riscv/insns/kdmatt.h deleted file mode 100644 index e917d41..0000000 --- a/riscv/insns/kdmatt.h +++ /dev/null @@ -1,17 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res; -sreg_t aop = P_SH(RS1, 1); -sreg_t bop = P_SH(RS2, 1); - -if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - res = aop * bop; - res <<= 1; -} else { - res = INT32_MAX; - P_SET_OV(1); -} - -res += sext32(RD); -P_SAT(res, 32); -WRITE_RD(sext32(res)); diff --git a/riscv/insns/kdmatt16.h b/riscv/insns/kdmatt16.h deleted file mode 100644 index ebce13f..0000000 --- a/riscv/insns/kdmatt16.h +++ /dev/null @@ -1,18 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - int32_t aop = P_SH(ps1, 1); - int32_t bop = P_SH(ps2, 1); - int32_t mres; - bool sat; - - if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - mres = aop * bop; - mres <<= 1; - } else { - mres = INT32_MAX; - P_SET_OV(1); - } - pd = (sat_add<int32_t, uint32_t>(pd, mres, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kdmbb.h b/riscv/insns/kdmbb.h deleted file mode 100644 index 2f7a3f9..0000000 --- a/riscv/insns/kdmbb.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res; -sreg_t aop = P_SH(RS1, 0); -sreg_t bop = P_SH(RS2, 0); -if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - res = aop * bop; - res <<= 1; -} else { - res = INT32_MAX; - P_SET_OV(1); -} -WRITE_RD(sext32(res)); diff --git a/riscv/insns/kdmbb16.h b/riscv/insns/kdmbb16.h deleted file mode 100644 index a84877d..0000000 --- a/riscv/insns/kdmbb16.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - int32_t aop = P_SH(ps1, 0); - int32_t bop = P_SH(ps2, 0); - if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - pd = aop * bop; - pd <<= 1; - } else { - pd = INT32_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/kdmbt.h b/riscv/insns/kdmbt.h deleted file mode 100644 index 7f093e3..0000000 --- a/riscv/insns/kdmbt.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res; -sreg_t aop = P_SH(RS1, 0); -sreg_t bop = P_SH(RS2, 1); -if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - res = aop * bop; - res <<= 1; -} else { - res = INT32_MAX; - P_SET_OV(1); -} -WRITE_RD(sext32(res)); diff --git a/riscv/insns/kdmbt16.h b/riscv/insns/kdmbt16.h deleted file mode 100644 index 85e9d0e..0000000 --- a/riscv/insns/kdmbt16.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - int32_t aop = P_SH(ps1, 0); - int32_t bop = P_SH(ps2, 1); - if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - pd = aop * bop; - pd <<= 1; - } else { - pd = INT32_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/kdmtt.h b/riscv/insns/kdmtt.h deleted file mode 100644 index 05a4c8c..0000000 --- a/riscv/insns/kdmtt.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res; -sreg_t aop = P_SH(RS1, 1); -sreg_t bop = P_SH(RS2, 1); -if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - res = aop * bop; - res <<= 1; -} else { - res = INT32_MAX; - P_SET_OV(1); -} -WRITE_RD(sext32(res)); diff --git a/riscv/insns/kdmtt16.h b/riscv/insns/kdmtt16.h deleted file mode 100644 index 2190710..0000000 --- a/riscv/insns/kdmtt16.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - int32_t aop = P_SH(ps1, 1); - int32_t bop = P_SH(ps2, 1); - if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - pd = aop * bop; - pd <<= 1; - } else { - pd = INT32_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/khm16.h b/riscv/insns/khm16.h deleted file mode 100644 index 9c2e28c..0000000 --- a/riscv/insns/khm16.h +++ /dev/null @@ -1,9 +0,0 @@ -require_vector_vs; -P_LOOP(16, { - if ((ps1 != INT16_MIN) | (ps2 != INT16_MIN)) { - pd = (ps1 * ps2) >> 15; - } else { - pd = INT16_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/khm8.h b/riscv/insns/khm8.h deleted file mode 100644 index ac21d68..0000000 --- a/riscv/insns/khm8.h +++ /dev/null @@ -1,9 +0,0 @@ -require_vector_vs; -P_LOOP(8, { - if ((ps1 != INT8_MIN) | (ps2 != INT8_MIN)) { - pd = (ps1 * ps2) >> 7; - } else { - pd = INT8_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/khmbb.h b/riscv/insns/khmbb.h deleted file mode 100644 index e08eddc..0000000 --- a/riscv/insns/khmbb.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res; -sreg_t aop = P_SH(RS1, 0); -sreg_t bop = P_SH(RS2, 0); -if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - res = aop * bop; - res >>= 15; -} else { - res = INT16_MAX; - P_SET_OV(1); -} -WRITE_RD(sext_xlen((int16_t)res)); diff --git a/riscv/insns/khmbb16.h b/riscv/insns/khmbb16.h deleted file mode 100644 index efbd7eb..0000000 --- a/riscv/insns/khmbb16.h +++ /dev/null @@ -1,14 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - int32_t aop = P_SH(ps1, 0); - int32_t bop = P_SH(ps2, 0); - if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - pd = aop * bop; - pd >>= 15; - } else { - pd = INT16_MAX; - P_SET_OV(1); - } - pd = (int16_t)pd; -}) diff --git a/riscv/insns/khmbt.h b/riscv/insns/khmbt.h deleted file mode 100644 index 0c19cd1..0000000 --- a/riscv/insns/khmbt.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res; -sreg_t aop = P_SH(RS1, 0); -sreg_t bop = P_SH(RS2, 1); -if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - res = aop * bop; - res >>= 15; -} else { - res = INT16_MAX; - P_SET_OV(1); -} -WRITE_RD(sext_xlen((int16_t)res)); diff --git a/riscv/insns/khmbt16.h b/riscv/insns/khmbt16.h deleted file mode 100644 index 4bb1f48..0000000 --- a/riscv/insns/khmbt16.h +++ /dev/null @@ -1,14 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - int32_t aop = P_SH(ps1, 0); - int32_t bop = P_SH(ps2, 1); - if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - pd = aop * bop; - pd >>= 15; - } else { - pd = INT16_MAX; - P_SET_OV(1); - } - pd = (int16_t)pd; -}) diff --git a/riscv/insns/khmtt.h b/riscv/insns/khmtt.h deleted file mode 100644 index dcd4503..0000000 --- a/riscv/insns/khmtt.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res; -sreg_t aop = P_SH(RS1, 1); -sreg_t bop = P_SH(RS2, 1); -if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - res = aop * bop; - res >>= 15; -} else { - res = INT16_MAX; - P_SET_OV(1); -} -WRITE_RD(sext_xlen((int16_t)res)); diff --git a/riscv/insns/khmtt16.h b/riscv/insns/khmtt16.h deleted file mode 100644 index d3c0b4c..0000000 --- a/riscv/insns/khmtt16.h +++ /dev/null @@ -1,14 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - int32_t aop = P_SH(ps1, 1); - int32_t bop = P_SH(ps2, 1); - if ((INT16_MIN != aop) | (INT16_MIN != bop)) { - pd = aop * bop; - pd >>= 15; - } else { - pd = INT16_MAX; - P_SET_OV(1); - } - pd = (int16_t)pd; -}) diff --git a/riscv/insns/khmx16.h b/riscv/insns/khmx16.h deleted file mode 100644 index bf93462..0000000 --- a/riscv/insns/khmx16.h +++ /dev/null @@ -1,9 +0,0 @@ -require_vector_vs; -P_CROSS_LOOP(16, { - if ((ps1 != INT16_MIN) | (ps2 != INT16_MIN)) { - pd = (ps1 * ps2) >> 15; - } else { - pd = INT16_MAX; - P_SET_OV(1); - } -},) diff --git a/riscv/insns/khmx8.h b/riscv/insns/khmx8.h deleted file mode 100644 index 0d6a5d5..0000000 --- a/riscv/insns/khmx8.h +++ /dev/null @@ -1,9 +0,0 @@ -require_vector_vs; -P_CROSS_LOOP(8, { - if ((ps1 != INT8_MIN) | (ps2 != INT8_MIN)) { - pd = (ps1 * ps2) >> 7; - } else { - pd = INT8_MAX; - P_SET_OV(1); - } -},) diff --git a/riscv/insns/kmabb.h b/riscv/insns/kmabb.h deleted file mode 100644 index f2d7715..0000000 --- a/riscv/insns/kmabb.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int32_t mres = P_SH(ps1, 0) * P_SH(ps2, 0); - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(pd, mres, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmabb32.h b/riscv/insns/kmabb32.h deleted file mode 100644 index 752bf8b..0000000 --- a/riscv/insns/kmabb32.h +++ /dev/null @@ -1,8 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat = false; -sreg_t mres = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 0); -WRITE_RD((sat_add<int64_t, uint64_t>(RD, mres, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmabt.h b/riscv/insns/kmabt.h deleted file mode 100644 index 4ead23b..0000000 --- a/riscv/insns/kmabt.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int32_t mres = P_SH(ps1, 0) * P_SH(ps2, 1); - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(pd, mres, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmabt32.h b/riscv/insns/kmabt32.h deleted file mode 100644 index ee7511b..0000000 --- a/riscv/insns/kmabt32.h +++ /dev/null @@ -1,8 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat = false; -sreg_t mres = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 1); -WRITE_RD((sat_add<int64_t, uint64_t>(RD, mres, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmada.h b/riscv/insns/kmada.h deleted file mode 100644 index 3c082c7..0000000 --- a/riscv/insns/kmada.h +++ /dev/null @@ -1,4 +0,0 @@ -require_vector_vs; -P_REDUCTION_LOOP(32, 16, true, true, { - pd_res += ps1 * ps2; -}) diff --git a/riscv/insns/kmadrs.h b/riscv/insns/kmadrs.h deleted file mode 100644 index a450351..0000000 --- a/riscv/insns/kmadrs.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_REDUCTION_LOOP(32, 16, true, true, { - if (j & 1) - pd_res -= ps1 * ps2; - else - pd_res += ps1 * ps2; -}) diff --git a/riscv/insns/kmadrs32.h b/riscv/insns/kmadrs32.h deleted file mode 100644 index 0f71e90..0000000 --- a/riscv/insns/kmadrs32.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat; -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 0); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 1); - -WRITE_RD((sat_add<sreg_t, reg_t>(RD, mres0, -mres1, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmads.h b/riscv/insns/kmads.h deleted file mode 100644 index 89aabe0..0000000 --- a/riscv/insns/kmads.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_REDUCTION_LOOP(32, 16, true, true, { - if (j & 1) - pd_res += ps1 * ps2; - else - pd_res -= ps1 * ps2; -}) diff --git a/riscv/insns/kmads32.h b/riscv/insns/kmads32.h deleted file mode 100644 index 0a3b590..0000000 --- a/riscv/insns/kmads32.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat; -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 0); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 1); - -WRITE_RD((sat_add<sreg_t, reg_t>(RD, -mres0, mres1, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmar64.h b/riscv/insns/kmar64.h deleted file mode 100644 index a4d332b..0000000 --- a/riscv/insns/kmar64.h +++ /dev/null @@ -1,15 +0,0 @@ -require_vector_vs; -P_64_PROFILE_BASE() -P_64_PROFILE_PARAM(true, false) - -bool sat = false; -sreg_t mres0 = (sreg_t)P_SW(rs1, 0) * P_SW(rs2, 0); -sreg_t mres1 = (sreg_t)P_SW(rs1, 1) * P_SW(rs2, 1); - -if (xlen == 32) { - rd = (sat_add<int64_t, uint64_t>(rd, mres0, sat)); -} else { - rd = (sat_add<int64_t, uint64_t>(rd, mres0, mres1, sat)); -} -P_SET_OV(sat); -P_64_PROFILE_END() diff --git a/riscv/insns/kmatt.h b/riscv/insns/kmatt.h deleted file mode 100644 index 4be2f3d..0000000 --- a/riscv/insns/kmatt.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int32_t mres = P_SH(ps1, 1) * P_SH(ps2, 1); - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(pd, mres, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmatt32.h b/riscv/insns/kmatt32.h deleted file mode 100644 index 4fe9ed2..0000000 --- a/riscv/insns/kmatt32.h +++ /dev/null @@ -1,8 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat = false; -sreg_t mres = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 1); -WRITE_RD((sat_add<int64_t, uint64_t>(RD, mres, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmaxda.h b/riscv/insns/kmaxda.h deleted file mode 100644 index 393f047..0000000 --- a/riscv/insns/kmaxda.h +++ /dev/null @@ -1,4 +0,0 @@ -require_vector_vs; -P_REDUCTION_CROSS_LOOP(32, 16, true, true, { - pd_res += ps1 * ps2; -}) diff --git a/riscv/insns/kmaxda32.h b/riscv/insns/kmaxda32.h deleted file mode 100644 index b9346b9..0000000 --- a/riscv/insns/kmaxda32.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat; -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 1); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 0); - -WRITE_RD((sat_add<sreg_t, reg_t>(RD, mres0, mres1, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmaxds.h b/riscv/insns/kmaxds.h deleted file mode 100644 index c2f0e59..0000000 --- a/riscv/insns/kmaxds.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_REDUCTION_CROSS_LOOP(32, 16, true, true, { - if (j & 1) - pd_res += ps1 * ps2; - else - pd_res -= ps1 * ps2; -}) diff --git a/riscv/insns/kmaxds32.h b/riscv/insns/kmaxds32.h deleted file mode 100644 index 6a7d64e..0000000 --- a/riscv/insns/kmaxds32.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat; -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 1); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 0); - -WRITE_RD((sat_add<sreg_t, reg_t>(RD, -mres0, mres1, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmda.h b/riscv/insns/kmda.h deleted file mode 100644 index 68b6c9a..0000000 --- a/riscv/insns/kmda.h +++ /dev/null @@ -1,4 +0,0 @@ -require_vector_vs; -P_REDUCTION_LOOP(32, 16, false, true, { - pd_res += ps1 * ps2; -}) diff --git a/riscv/insns/kmda32.h b/riscv/insns/kmda32.h deleted file mode 100644 index 646021f..0000000 --- a/riscv/insns/kmda32.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat; -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 0); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 1); - -WRITE_RD((sat_add<sreg_t, reg_t>(mres0, mres1, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmmac.h b/riscv/insns/kmmac.h deleted file mode 100644 index 946f0fe..0000000 --- a/riscv/insns/kmmac.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int64_t) ps2; - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(pd, (mres >> 32), sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmac_u.h b/riscv/insns/kmmac_u.h deleted file mode 100644 index 5a06a4d..0000000 --- a/riscv/insns/kmmac_u.h +++ /dev/null @@ -1,8 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int64_t) ps2; - int32_t round = (((mres >> 31) + 1) >> 1); - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(pd, round, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmawb.h b/riscv/insns/kmmawb.h deleted file mode 100644 index 0e3a694..0000000 --- a/riscv/insns/kmmawb.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t mres = (int64_t)ps1 * P_SH(ps2, 0); - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(pd, (mres >> 16), sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmawb2.h b/riscv/insns/kmmawb2.h deleted file mode 100644 index 274f9dd..0000000 --- a/riscv/insns/kmmawb2.h +++ /dev/null @@ -1,15 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t addop = 0; - int64_t mres = 0; - bool sat = false; - if ((INT32_MIN != ps1) | (INT16_MIN != P_SH(ps2, 0))) { - mres = ((int64_t) ps1 * P_SH(ps2, 0)) << 1; - addop = mres >> 16; - } else { - addop = INT32_MAX; - P_SET_OV(1); - } - pd = (sat_add<int32_t, uint32_t>(pd, addop, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmawb2_u.h b/riscv/insns/kmmawb2_u.h deleted file mode 100644 index 447a3f4..0000000 --- a/riscv/insns/kmmawb2_u.h +++ /dev/null @@ -1,15 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t addop = 0; - int64_t mres = 0; - bool sat = false; - if ((INT32_MIN != ps1) | (INT16_MIN != P_SH(ps2, 0))) { - mres = ((int64_t) ps1 * P_SH(ps2, 0)) << 1; - addop = ((mres >> 15) + 1) >> 1; - } else { - addop = INT32_MAX; - P_SET_OV(1); - } - pd = (sat_add<int32_t, uint32_t>(pd, addop, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmawb_u.h b/riscv/insns/kmmawb_u.h deleted file mode 100644 index 766dd71..0000000 --- a/riscv/insns/kmmawb_u.h +++ /dev/null @@ -1,8 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t mres = (int64_t)ps1 * P_SH(ps2, 0); - int32_t round = (((mres >> 15) + 1) >> 1); - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(pd, round, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmawt.h b/riscv/insns/kmmawt.h deleted file mode 100644 index 514ee48..0000000 --- a/riscv/insns/kmmawt.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t mres = (int64_t)ps1 * P_SH(ps2, 1); - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(pd, (mres >> 16), sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmawt2.h b/riscv/insns/kmmawt2.h deleted file mode 100644 index 6eb22ac..0000000 --- a/riscv/insns/kmmawt2.h +++ /dev/null @@ -1,15 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t addop = 0; - int64_t mres = 0; - bool sat = false; - if ((INT32_MIN != ps1) | (INT16_MIN != P_SH(ps2, 1))) { - mres = ((int64_t) ps1 * P_SH(ps2, 1)) << 1; - addop = mres >> 16; - } else { - addop = INT32_MAX; - P_SET_OV(1); - } - pd = (sat_add<int32_t, uint32_t>(pd, addop, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmawt2_u.h b/riscv/insns/kmmawt2_u.h deleted file mode 100644 index b82e090..0000000 --- a/riscv/insns/kmmawt2_u.h +++ /dev/null @@ -1,15 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t addop = 0; - int64_t mres = 0; - bool sat = false; - if ((INT32_MIN != ps1) | (INT16_MIN != P_SH(ps2, 1))) { - mres = ((int64_t) ps1 * P_SH(ps2, 1)) << 1; - addop = ((mres >> 15) + 1) >> 1; - } else { - addop = INT32_MAX; - P_SET_OV(1); - } - pd = (sat_add<int32_t, uint32_t>(pd, addop, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmawt_u.h b/riscv/insns/kmmawt_u.h deleted file mode 100644 index 74d8fd0..0000000 --- a/riscv/insns/kmmawt_u.h +++ /dev/null @@ -1,8 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t mres = (int64_t)ps1 * P_SH(ps2, 1); - int32_t round = (((mres >> 15) + 1) >> 1); - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(pd, round, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmsb.h b/riscv/insns/kmmsb.h deleted file mode 100644 index 29ad1bf..0000000 --- a/riscv/insns/kmmsb.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int64_t) ps2; - bool sat = false; - pd = (sat_sub<int32_t, uint32_t>(pd, (mres >> 32), sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmsb_u.h b/riscv/insns/kmmsb_u.h deleted file mode 100644 index c7b283e..0000000 --- a/riscv/insns/kmmsb_u.h +++ /dev/null @@ -1,8 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int64_t) ps2; - int32_t round = (((mres >> 31) + 1) >> 1); - bool sat = false; - pd = (sat_sub<int32_t, uint32_t>(pd, round, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kmmwb2.h b/riscv/insns/kmmwb2.h deleted file mode 100644 index d08b0ef..0000000 --- a/riscv/insns/kmmwb2.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - if ((INT32_MIN != ps1) | (INT16_MIN != P_SH(ps2, 0))) { - int64_t mres = ((int64_t) ps1 * P_SH(ps2, 0)) << 1; - pd = mres >> 16; - } else { - pd = INT32_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/kmmwb2_u.h b/riscv/insns/kmmwb2_u.h deleted file mode 100644 index d308bf3..0000000 --- a/riscv/insns/kmmwb2_u.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - if ((INT32_MIN != ps1) | (INT16_MIN != P_SH(ps2, 0))) { - int64_t mres = ((int64_t) ps1 * P_SH(ps2, 0)) << 1; - pd = ((mres >> 15) + 1) >> 1; - } else { - pd = INT32_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/kmmwt2.h b/riscv/insns/kmmwt2.h deleted file mode 100644 index 38ba9b1..0000000 --- a/riscv/insns/kmmwt2.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - if ((INT32_MIN != ps1) | (INT16_MIN != P_SH(ps2, 1))) { - int64_t mres = ((int64_t) ps1 * P_SH(ps2, 1)) << 1; - pd = mres >> 16; - } else { - pd = INT32_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/kmmwt2_u.h b/riscv/insns/kmmwt2_u.h deleted file mode 100644 index e855786..0000000 --- a/riscv/insns/kmmwt2_u.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - if ((INT32_MIN != ps1) | (INT16_MIN != P_SH(ps2, 1))) { - int64_t mres = ((int64_t) ps1 * P_SH(ps2, 1)) << 1; - pd = ((mres >> 15) + 1) >> 1; - } else { - pd = INT32_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/kmsda.h b/riscv/insns/kmsda.h deleted file mode 100644 index 94b118a..0000000 --- a/riscv/insns/kmsda.h +++ /dev/null @@ -1,4 +0,0 @@ -require_vector_vs; -P_REDUCTION_LOOP(32, 16, true, true, { - pd_res -= ps1 * ps2; -}) diff --git a/riscv/insns/kmsda32.h b/riscv/insns/kmsda32.h deleted file mode 100644 index d54d42c..0000000 --- a/riscv/insns/kmsda32.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat; -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 0); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 1); - -WRITE_RD((sat_add<sreg_t, reg_t>(RD, -mres0, -mres1, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmsr64.h b/riscv/insns/kmsr64.h deleted file mode 100644 index bfef503..0000000 --- a/riscv/insns/kmsr64.h +++ /dev/null @@ -1,26 +0,0 @@ -require_vector_vs; -P_64_PROFILE_BASE() -P_64_PROFILE_PARAM(true, false) - -bool sat = false; -sreg_t mres0 = -(sreg_t)P_SW(rs1, 0) * P_SW(rs2, 0); -sreg_t mres1 = -(sreg_t)P_SW(rs1, 1) * P_SW(rs2, 1); -sreg_t res; - -if (xlen == 32) { - rd = (sat_add<int64_t, uint64_t>(rd, mres0, sat)); -} else { - if ((rd ^ mres0) < 0) { - res = rd + mres0; - rd = (sat_add<int64_t, uint64_t>(res, mres1, sat)); - } else if ((rd ^ mres1) < 0) { - res = rd + mres1; - rd = (sat_add<int64_t, uint64_t>(res, mres0, sat)); - } else { - rd = (sat_add<int64_t, uint64_t>(rd, mres0, sat)); - P_SET_OV(sat); - rd = (sat_add<int64_t, uint64_t>(rd, mres1, sat)); - } -} -P_SET_OV(sat); -P_64_PROFILE_END() diff --git a/riscv/insns/kmsxda.h b/riscv/insns/kmsxda.h deleted file mode 100644 index 2d0faa3..0000000 --- a/riscv/insns/kmsxda.h +++ /dev/null @@ -1,4 +0,0 @@ -require_vector_vs; -P_REDUCTION_CROSS_LOOP(32, 16, true, true, { - pd_res -= ps1 * ps2; -}) diff --git a/riscv/insns/kmsxda32.h b/riscv/insns/kmsxda32.h deleted file mode 100644 index 3006b54..0000000 --- a/riscv/insns/kmsxda32.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat; -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 1); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 0); - -WRITE_RD((sat_add<sreg_t, reg_t>(RD, -mres0, -mres1, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/kmxda.h b/riscv/insns/kmxda.h deleted file mode 100644 index 4addd8a..0000000 --- a/riscv/insns/kmxda.h +++ /dev/null @@ -1,4 +0,0 @@ -require_vector_vs; -P_REDUCTION_CROSS_LOOP(32, 16, false, true, { - pd_res += ps1 * ps2; -}) diff --git a/riscv/insns/kmxda32.h b/riscv/insns/kmxda32.h deleted file mode 100644 index 99a8204..0000000 --- a/riscv/insns/kmxda32.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -require_rv64; -require_extension(EXT_ZPN); - -bool sat; -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 1); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 0); - -WRITE_RD((sat_add<sreg_t, reg_t>(mres0, mres1, sat))); -P_SET_OV(sat); diff --git a/riscv/insns/ksll16.h b/riscv/insns/ksll16.h deleted file mode 100644 index 9e03b34..0000000 --- a/riscv/insns/ksll16.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_X_LOOP(16, 4, { - auto res = (sreg_t)ps1 << sa; - P_SAT(res, 16); - pd = res; -}) diff --git a/riscv/insns/ksll32.h b/riscv/insns/ksll32.h deleted file mode 100644 index 3588898..0000000 --- a/riscv/insns/ksll32.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -require_rv64; -P_X_LOOP(32, 5, { - auto res = (sreg_t)ps1 << sa; - P_SAT(res, 32); - pd = res; -}) diff --git a/riscv/insns/ksll8.h b/riscv/insns/ksll8.h deleted file mode 100644 index 930ea03..0000000 --- a/riscv/insns/ksll8.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_X_LOOP(8, 3, { - auto res = (sreg_t)ps1 << sa; - P_SAT(res, 8); - pd = res; -}) diff --git a/riscv/insns/kslli16.h b/riscv/insns/kslli16.h deleted file mode 100644 index edc7c67..0000000 --- a/riscv/insns/kslli16.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_I_LOOP(16, 4, { - auto res = (sreg_t)ps1 << imm4u; - P_SAT(res, 16); - pd = res; -}) diff --git a/riscv/insns/kslli32.h b/riscv/insns/kslli32.h deleted file mode 100644 index 4fd506b..0000000 --- a/riscv/insns/kslli32.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -require_rv64; -P_I_LOOP(32, 5, { - auto res = (sreg_t)ps1 << imm5u; - P_SAT(res, 32); - pd = res; -}) diff --git a/riscv/insns/kslli8.h b/riscv/insns/kslli8.h deleted file mode 100644 index 18d714f..0000000 --- a/riscv/insns/kslli8.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_I_LOOP(8, 3, { - auto res = (sreg_t)ps1 << imm3u; - P_SAT(res, 8); - pd = res; -}) diff --git a/riscv/insns/kslliw.h b/riscv/insns/kslliw.h deleted file mode 100644 index 8902d3a..0000000 --- a/riscv/insns/kslliw.h +++ /dev/null @@ -1,8 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t rs1 = sext32(RS1); -sreg_t sa = insn.p_imm5(); -sreg_t res = rs1 << sa; - -P_SAT(res, 32); -WRITE_RD(sext32(res)); diff --git a/riscv/insns/ksllw.h b/riscv/insns/ksllw.h deleted file mode 100644 index 7e8452f..0000000 --- a/riscv/insns/ksllw.h +++ /dev/null @@ -1,8 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t rs1 = sext32(RS1); -sreg_t sa = get_field(RS2, make_mask64(0, 5)); -sreg_t res = rs1 << sa; - -P_SAT(res, 32); -WRITE_RD(sext32(res)); diff --git a/riscv/insns/kslra16.h b/riscv/insns/kslra16.h deleted file mode 100644 index ad1443a..0000000 --- a/riscv/insns/kslra16.h +++ /dev/null @@ -1,12 +0,0 @@ -require_vector_vs; -P_X_LOOP(16, 5, { - if (ssa < 0) { - sa = -ssa; - sa = (sa == 16) ? 15 : sa; - pd = ps1 >> sa; - } else { - auto res = (sreg_t)ps1 << ssa; - P_SAT(res, 16); - pd = res; - } -}) diff --git a/riscv/insns/kslra16_u.h b/riscv/insns/kslra16_u.h deleted file mode 100644 index 27bb77c..0000000 --- a/riscv/insns/kslra16_u.h +++ /dev/null @@ -1,15 +0,0 @@ -require_vector_vs; -P_X_LOOP(16, 5, { - if (ssa < 0) { - sa = -ssa; - sa = (sa == 16) ? 15 : sa; - if (sa != 0) - pd = ((ps1 >> (sa - 1)) + 1) >> 1; - else - pd = ps1; - } else { - auto res = (sreg_t)ps1 << ssa; - P_SAT(res, 16); - pd = res; - } -}) diff --git a/riscv/insns/kslra32.h b/riscv/insns/kslra32.h deleted file mode 100644 index 871d601..0000000 --- a/riscv/insns/kslra32.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -require_rv64; -P_X_LOOP(32, 6, { - if (ssa < 0) { - sa = -ssa; - sa = (sa == 32) ? 31 : sa; - pd = ps1 >> sa; - } else { - auto res = (sreg_t)ps1 << ssa; - P_SAT(res, 32); - pd = res; - } -}) diff --git a/riscv/insns/kslra32_u.h b/riscv/insns/kslra32_u.h deleted file mode 100644 index b9c06cf..0000000 --- a/riscv/insns/kslra32_u.h +++ /dev/null @@ -1,16 +0,0 @@ -require_vector_vs; -require_rv64; -P_X_LOOP(32, 6, { - if (ssa < 0) { - sa = -ssa; - sa = (sa == 32) ? 31 : sa; - if (sa != 0) - pd = ((ps1 >> (sa - 1)) + 1) >> 1; - else - pd = ps1; - } else { - auto res = (sreg_t)ps1 << ssa; - P_SAT(res, 32); - pd = res; - } -}) diff --git a/riscv/insns/kslra8.h b/riscv/insns/kslra8.h deleted file mode 100644 index b3f3e6b..0000000 --- a/riscv/insns/kslra8.h +++ /dev/null @@ -1,12 +0,0 @@ -require_vector_vs; -P_X_LOOP(8, 4, { - if (ssa < 0) { - sa = -ssa; - sa = (sa == 8) ? 7 : sa; - pd = ps1 >> sa; - } else { - auto res = (sreg_t)ps1 << ssa; - P_SAT(res, 8); - pd = res; - } -}) diff --git a/riscv/insns/kslra8_u.h b/riscv/insns/kslra8_u.h deleted file mode 100644 index 340283f..0000000 --- a/riscv/insns/kslra8_u.h +++ /dev/null @@ -1,15 +0,0 @@ -require_vector_vs; -P_X_LOOP(8, 4, { - if (ssa < 0) { - sa = -ssa; - sa = (sa == 8) ? 7 : sa; - if (sa != 0) - pd = ((ps1 >> (sa - 1)) + 1) >> 1; - else - pd = ps1; - } else { - auto res = (sreg_t)ps1 << ssa; - P_SAT(res, 8); - pd = res; - } -}) diff --git a/riscv/insns/kslraw.h b/riscv/insns/kslraw.h deleted file mode 100644 index fa4c844..0000000 --- a/riscv/insns/kslraw.h +++ /dev/null @@ -1,14 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t rs1 = sext32(RS1); -sreg_t sa = int64_t(RS2) << (64 - 6) >> (64 - 6); - -if (sa < 0) { - sa = -sa; - sa = (sa == 32) ? 31 : sa; - WRITE_RD(sext32(rs1 >> sa)); -} else { - auto res = rs1 << sa; - P_SAT(res, 32); - WRITE_RD(sext32(res)); -} diff --git a/riscv/insns/kslraw_u.h b/riscv/insns/kslraw_u.h deleted file mode 100644 index ebecb61..0000000 --- a/riscv/insns/kslraw_u.h +++ /dev/null @@ -1,14 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t rs1 = sext32(RS1); -sreg_t sa = int64_t(RS2) << (64 - 6) >> (64 - 6); - -if (sa < 0) { - sa = -sa; - sa = (sa == 32) ? 31 : sa; - WRITE_RD(sext32(((rs1 >> (sa - 1)) + 1)) >> 1); -} else { - auto res = rs1 << sa; - P_SAT(res, 32); - WRITE_RD(sext32(res)); -} diff --git a/riscv/insns/kstas16.h b/riscv/insns/kstas16.h deleted file mode 100644 index ad18013..0000000 --- a/riscv/insns/kstas16.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_STRAIGHT_ULOOP(16, { - bool sat = false; - pd = (sat_add<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_sub<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kstas32.h b/riscv/insns/kstas32.h deleted file mode 100644 index 35f23e0..0000000 --- a/riscv/insns/kstas32.h +++ /dev/null @@ -1,11 +0,0 @@ -require_vector_vs; -require_rv64; -P_STRAIGHT_ULOOP(32, { - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_sub<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kstsa16.h b/riscv/insns/kstsa16.h deleted file mode 100644 index 47a8918..0000000 --- a/riscv/insns/kstsa16.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_STRAIGHT_ULOOP(16, { - bool sat = false; - pd = (sat_sub<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_add<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/kstsa32.h b/riscv/insns/kstsa32.h deleted file mode 100644 index aa9c372..0000000 --- a/riscv/insns/kstsa32.h +++ /dev/null @@ -1,11 +0,0 @@ -require_vector_vs; -require_rv64; -P_STRAIGHT_ULOOP(32, { - bool sat = false; - pd = (sat_sub<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_add<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ksub16.h b/riscv/insns/ksub16.h deleted file mode 100644 index 57562b5..0000000 --- a/riscv/insns/ksub16.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_LOOP(16, { - bool sat = false; - pd = (sat_sub<int16_t, uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ksub32.h b/riscv/insns/ksub32.h deleted file mode 100644 index 3ef32e8..0000000 --- a/riscv/insns/ksub32.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -require_rv64; -P_LOOP(32, { - bool sat = false; - pd = (sat_sub<int32_t, uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ksub64.h b/riscv/insns/ksub64.h deleted file mode 100644 index c6f0994..0000000 --- a/riscv/insns/ksub64.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_64_PROFILE({ - bool sat = false; - rd = (sat_sub<int64_t, uint64_t>(rs1, rs2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ksub8.h b/riscv/insns/ksub8.h deleted file mode 100644 index 705f632..0000000 --- a/riscv/insns/ksub8.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_LOOP(8, { - bool sat = false; - pd = (sat_sub<int8_t, uint8_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ksubh.h b/riscv/insns/ksubh.h deleted file mode 100644 index 2455c16..0000000 --- a/riscv/insns/ksubh.h +++ /dev/null @@ -1,5 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_SH(RS1, 0) - (sreg_t)P_SH(RS2, 0); -P_SAT(res, 16); -WRITE_RD(sext_xlen((int16_t)res)); diff --git a/riscv/insns/ksubw.h b/riscv/insns/ksubw.h deleted file mode 100644 index 3a3d780..0000000 --- a/riscv/insns/ksubw.h +++ /dev/null @@ -1,5 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_SW(RS1, 0) - (sreg_t)P_SW(RS2, 0); -P_SAT(res, 32); -WRITE_RD(sext32(res)); diff --git a/riscv/insns/kwmmul.h b/riscv/insns/kwmmul.h deleted file mode 100644 index ca654f2..0000000 --- a/riscv/insns/kwmmul.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - if ((INT32_MIN != ps1) | (INT32_MIN != ps2)) { - int64_t mres = ((int64_t) ps1 * (int64_t) ps2) << 1; - pd = mres >> 32; - } else { - pd = INT32_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/kwmmul_u.h b/riscv/insns/kwmmul_u.h deleted file mode 100644 index b435561..0000000 --- a/riscv/insns/kwmmul_u.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_LOOP(32, { - if ((INT32_MIN != ps1) | (INT32_MIN != ps2)) { - int64_t mres = ((int64_t) ps1 * (int64_t) ps2) << 1; - pd = ((mres >> 31) + 1) >> 1; - } else { - pd = INT32_MAX; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/maddr32.h b/riscv/insns/maddr32.h deleted file mode 100644 index 943aeac..0000000 --- a/riscv/insns/maddr32.h +++ /dev/null @@ -1,5 +0,0 @@ -require_extension(EXT_ZPN); -reg_t mres = (reg_t)P_W(RS1, 0) * P_W(RS2, 0); -reg_t rd = P_W(RD, 0); -rd += mres; -WRITE_RD(sext_xlen((int32_t)rd)); diff --git a/riscv/insns/max.h b/riscv/insns/max.h index 073b8df..09f29f5 100644 --- a/riscv/insns/max.h +++ b/riscv/insns/max.h @@ -1,2 +1,2 @@ -require_either_extension(EXT_ZBPBO, EXT_ZBB); +require_extension(EXT_ZBB); WRITE_RD(sext_xlen(sreg_t(RS1) > sreg_t(RS2) ? RS1 : RS2)); diff --git a/riscv/insns/min.h b/riscv/insns/min.h index 47bc993..174e312 100644 --- a/riscv/insns/min.h +++ b/riscv/insns/min.h @@ -1,2 +1,2 @@ -require_either_extension(EXT_ZBPBO, EXT_ZBB); +require_extension(EXT_ZBB); WRITE_RD(sext_xlen(sreg_t(RS1) < sreg_t(RS2) ? RS1 : RS2)); diff --git a/riscv/insns/msubr32.h b/riscv/insns/msubr32.h deleted file mode 100644 index 2086bd1..0000000 --- a/riscv/insns/msubr32.h +++ /dev/null @@ -1,5 +0,0 @@ -require_extension(EXT_ZPN); -reg_t mres = (reg_t)P_W(RS1, 0) * P_W(RS2, 0); -reg_t rd = P_W(RD, 0); -rd -= mres; -WRITE_RD(sext_xlen((int32_t)rd)); diff --git a/riscv/insns/mulr64.h b/riscv/insns/mulr64.h deleted file mode 100644 index 4e2aad7..0000000 --- a/riscv/insns/mulr64.h +++ /dev/null @@ -1,3 +0,0 @@ -require_extension(EXT_ZPSFOPERAND); -reg_t rd = (reg_t)P_W(RS1, 0) * P_W(RS2, 0); -P_64_PROFILE_END(); diff --git a/riscv/insns/mulsr64.h b/riscv/insns/mulsr64.h deleted file mode 100644 index a2a5115..0000000 --- a/riscv/insns/mulsr64.h +++ /dev/null @@ -1,3 +0,0 @@ -require_extension(EXT_ZPSFOPERAND); -sreg_t rd = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 0); -P_64_PROFILE_END(); diff --git a/riscv/insns/pack.h b/riscv/insns/pack.h index 0622b92..acc4987 100644 --- a/riscv/insns/pack.h +++ b/riscv/insns/pack.h @@ -1,6 +1,5 @@ // RV32Zbb contains zext.h but not general pack require(((xlen == 32) && (insn.rs2() == 0) && p->extension_enabled(EXT_ZBB)) - || p->extension_enabled(EXT_ZPN) || p->extension_enabled(EXT_ZBKB)); reg_t lo = zext_xlen(RS1 << (xlen/2)) >> (xlen/2); reg_t hi = zext_xlen(RS2 << (xlen/2)); diff --git a/riscv/insns/packu.h b/riscv/insns/packu.h deleted file mode 100644 index 0676429..0000000 --- a/riscv/insns/packu.h +++ /dev/null @@ -1,4 +0,0 @@ -require_extension(EXT_ZPN); -reg_t lo = zext_xlen(RS1) >> (xlen/2); -reg_t hi = zext_xlen(RS2) >> (xlen/2) << (xlen/2); -WRITE_RD(sext_xlen(lo | hi)); diff --git a/riscv/insns/pbsad.h b/riscv/insns/pbsad.h deleted file mode 100644 index 32789ef..0000000 --- a/riscv/insns/pbsad.h +++ /dev/null @@ -1,3 +0,0 @@ -P_REDUCTION_ULOOP(64, 8, false, false, { - pd_res += (ps1 > ps2 ? ps1 - ps2 : ps2 - ps1); -}) diff --git a/riscv/insns/pbsada.h b/riscv/insns/pbsada.h deleted file mode 100644 index cab988e..0000000 --- a/riscv/insns/pbsada.h +++ /dev/null @@ -1,3 +0,0 @@ -P_REDUCTION_ULOOP(64, 8, true, false, { - pd_res += (ps1 > ps2 ? ps1 - ps2 : ps2 - ps1); -}) diff --git a/riscv/insns/pkbb16.h b/riscv/insns/pkbb16.h deleted file mode 100644 index 20dcde6..0000000 --- a/riscv/insns/pkbb16.h +++ /dev/null @@ -1,2 +0,0 @@ -require_rv64; -P_PK(16, 0, 0); diff --git a/riscv/insns/pkbt16.h b/riscv/insns/pkbt16.h deleted file mode 100644 index 8c51ab7..0000000 --- a/riscv/insns/pkbt16.h +++ /dev/null @@ -1 +0,0 @@ -P_PK(16, 0, 1); diff --git a/riscv/insns/pkbt32.h b/riscv/insns/pkbt32.h deleted file mode 100644 index 2783d98..0000000 --- a/riscv/insns/pkbt32.h +++ /dev/null @@ -1,2 +0,0 @@ -require_rv64; -P_PK(32, 0, 1); diff --git a/riscv/insns/pktb16.h b/riscv/insns/pktb16.h deleted file mode 100644 index c49c1ed..0000000 --- a/riscv/insns/pktb16.h +++ /dev/null @@ -1 +0,0 @@ -P_PK(16, 1, 0); diff --git a/riscv/insns/pktb32.h b/riscv/insns/pktb32.h deleted file mode 100644 index 0a7e17f..0000000 --- a/riscv/insns/pktb32.h +++ /dev/null @@ -1,2 +0,0 @@ -require_rv64; -P_PK(32, 1, 0); diff --git a/riscv/insns/pktt16.h b/riscv/insns/pktt16.h deleted file mode 100644 index b263ed4..0000000 --- a/riscv/insns/pktt16.h +++ /dev/null @@ -1,2 +0,0 @@ -require_rv64; -P_PK(16, 1, 1); diff --git a/riscv/insns/radd16.h b/riscv/insns/radd16.h deleted file mode 100644 index 8f80050..0000000 --- a/riscv/insns/radd16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(16, { - pd = (ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/radd32.h b/riscv/insns/radd32.h deleted file mode 100644 index df50dd1..0000000 --- a/riscv/insns/radd32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_LOOP(32, { - pd = ((int64_t)ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/radd64.h b/riscv/insns/radd64.h deleted file mode 100644 index 110c472..0000000 --- a/riscv/insns/radd64.h +++ /dev/null @@ -1,8 +0,0 @@ -P_64_PROFILE({ - rd = (rs1 + rs2) >> 1; - if (rs1 > 0 && rs2 > 0) { - rd &= ~((reg_t)1 << 63); - } else if (rs1 < 0 && rs2 < 0) { - rd |= ((reg_t)1 << 63); - } -}) diff --git a/riscv/insns/radd8.h b/riscv/insns/radd8.h deleted file mode 100644 index ad0b6ec..0000000 --- a/riscv/insns/radd8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(8, { - pd = (ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/raddw.h b/riscv/insns/raddw.h deleted file mode 100644 index ec04bb6..0000000 --- a/riscv/insns/raddw.h +++ /dev/null @@ -1,4 +0,0 @@ -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_SW(RS1, 0) + (sreg_t)P_SW(RS2, 0); -res >>= 1; -WRITE_RD(sext_xlen(res)); diff --git a/riscv/insns/rcras16.h b/riscv/insns/rcras16.h deleted file mode 100644 index 529c27f..0000000 --- a/riscv/insns/rcras16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_CROSS_LOOP(16, { - pd = (ps1 + ps2) >> 1; -}, { - pd = (ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/rcras32.h b/riscv/insns/rcras32.h deleted file mode 100644 index 86a3f65..0000000 --- a/riscv/insns/rcras32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_CROSS_LOOP(32, { - pd = ((int64_t)ps1 + ps2) >> 1; -}, { - pd = ((int64_t)ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/rcrsa16.h b/riscv/insns/rcrsa16.h deleted file mode 100644 index 156e32c..0000000 --- a/riscv/insns/rcrsa16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_CROSS_LOOP(16, { - pd = (ps1 - ps2) >> 1; -}, { - pd = (ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/rcrsa32.h b/riscv/insns/rcrsa32.h deleted file mode 100644 index b45f31f..0000000 --- a/riscv/insns/rcrsa32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_CROSS_LOOP(32, { - pd = ((uint64_t)ps1 - ps2) >> 1; -}, { - pd = ((uint64_t)ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/rstas16.h b/riscv/insns/rstas16.h deleted file mode 100644 index 298b591..0000000 --- a/riscv/insns/rstas16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_STRAIGHT_LOOP(16, { - pd = (ps1 + ps2) >> 1; -}, { - pd = (ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/rstas32.h b/riscv/insns/rstas32.h deleted file mode 100644 index 9c8995a..0000000 --- a/riscv/insns/rstas32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_STRAIGHT_LOOP(32, { - pd = ((int64_t)ps1 + ps2) >> 1; -}, { - pd = ((int64_t)ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/rstsa16.h b/riscv/insns/rstsa16.h deleted file mode 100644 index 443e4ce..0000000 --- a/riscv/insns/rstsa16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_STRAIGHT_LOOP(16, { - pd = (ps1 - ps2) >> 1; -}, { - pd = (ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/rstsa32.h b/riscv/insns/rstsa32.h deleted file mode 100644 index a89fc6e..0000000 --- a/riscv/insns/rstsa32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_STRAIGHT_LOOP(32, { - pd = ((int64_t)ps1 - ps2) >> 1; -}, { - pd = ((int64_t)ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/rsub16.h b/riscv/insns/rsub16.h deleted file mode 100644 index 768e067..0000000 --- a/riscv/insns/rsub16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(16, { - pd = (ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/rsub32.h b/riscv/insns/rsub32.h deleted file mode 100644 index 22c3119..0000000 --- a/riscv/insns/rsub32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_LOOP(32, { - pd = ((int64_t)ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/rsub64.h b/riscv/insns/rsub64.h deleted file mode 100644 index 2a58485..0000000 --- a/riscv/insns/rsub64.h +++ /dev/null @@ -1,8 +0,0 @@ -P_64_PROFILE({ - rd = (rs1 - rs2) >> 1; - if (rs1 > 0 && rs2 < 0) { - rd &= ~((reg_t)1 << 63); - } else if (rs1 < 0 && rs2 > 0) { - rd |= ((reg_t)1 << 63); - } -}) diff --git a/riscv/insns/rsub8.h b/riscv/insns/rsub8.h deleted file mode 100644 index 9cf9c1a..0000000 --- a/riscv/insns/rsub8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(8, { - pd = (ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/rsubw.h b/riscv/insns/rsubw.h deleted file mode 100644 index 01dec51..0000000 --- a/riscv/insns/rsubw.h +++ /dev/null @@ -1,4 +0,0 @@ -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_SW(RS1, 0) - (sreg_t)P_SW(RS2, 0); -res >>= 1; -WRITE_RD(sext_xlen(res)); diff --git a/riscv/insns/sclip16.h b/riscv/insns/sclip16.h deleted file mode 100644 index d90ce19..0000000 --- a/riscv/insns/sclip16.h +++ /dev/null @@ -1,14 +0,0 @@ -require_vector_vs; -P_I_LOOP(16, 4, { - int64_t int_max = INT64_MAX >> (64 - (imm4u + 1)); - int64_t int_min = INT64_MIN >> (64 - (imm4u + 1)); - pd = ps1; - - if (ps1 > int_max) { - pd = int_max; - P_SET_OV(1); - } else if (ps1 < int_min) { - pd = int_min; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/sclip32.h b/riscv/insns/sclip32.h deleted file mode 100644 index ff1ba28..0000000 --- a/riscv/insns/sclip32.h +++ /dev/null @@ -1,14 +0,0 @@ -require_vector_vs; -P_I_LOOP(32, 5, { - int64_t int_max = INT64_MAX >> (64 - (imm5u + 1)); - int64_t int_min = INT64_MIN >> (64 - (imm5u + 1)); - pd = ps1; - - if (ps1 > int_max) { - pd = int_max; - P_SET_OV(1); - } else if (ps1 < int_min) { - pd = int_min; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/sclip8.h b/riscv/insns/sclip8.h deleted file mode 100644 index afd9c69..0000000 --- a/riscv/insns/sclip8.h +++ /dev/null @@ -1,14 +0,0 @@ -require_vector_vs; -P_I_LOOP(8, 3, { - int64_t int_max = INT64_MAX >> (64 - (imm3u + 1)); - int64_t int_min = INT64_MIN >> (64 - (imm3u + 1)); - pd = ps1; - - if (ps1 > int_max) { - pd = int_max; - P_SET_OV(1); - } else if (ps1 < int_min) { - pd = int_min; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/scmple16.h b/riscv/insns/scmple16.h deleted file mode 100644 index 060c04c..0000000 --- a/riscv/insns/scmple16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(16, { - pd = (ps1 <= ps2) ? -1 : 0; -}) diff --git a/riscv/insns/scmple8.h b/riscv/insns/scmple8.h deleted file mode 100644 index 8920c1f..0000000 --- a/riscv/insns/scmple8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(8, { - pd = (ps1 <= ps2) ? -1 : 0; -}) diff --git a/riscv/insns/scmplt16.h b/riscv/insns/scmplt16.h deleted file mode 100644 index db62f6f..0000000 --- a/riscv/insns/scmplt16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(16, { - pd = (ps1 < ps2) ? -1 : 0; -}) diff --git a/riscv/insns/scmplt8.h b/riscv/insns/scmplt8.h deleted file mode 100644 index 7d07209..0000000 --- a/riscv/insns/scmplt8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(8, { - pd = (ps1 < ps2) ? -1 : 0; -}) diff --git a/riscv/insns/sll16.h b/riscv/insns/sll16.h deleted file mode 100644 index 9659f53..0000000 --- a/riscv/insns/sll16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_X_ULOOP(16, 4, { - pd = ps1 << sa; -}) diff --git a/riscv/insns/sll32.h b/riscv/insns/sll32.h deleted file mode 100644 index 8a05b39..0000000 --- a/riscv/insns/sll32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_X_ULOOP(32, 5, { - pd = ps1 << sa; -}) diff --git a/riscv/insns/sll8.h b/riscv/insns/sll8.h deleted file mode 100644 index b7f069a..0000000 --- a/riscv/insns/sll8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_X_ULOOP(8, 3, { - pd = ps1 << sa; -}) diff --git a/riscv/insns/slli16.h b/riscv/insns/slli16.h deleted file mode 100644 index 8d89a61..0000000 --- a/riscv/insns/slli16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_I_ULOOP(16, 4, { - pd = ps1 << imm4u; -}) diff --git a/riscv/insns/slli32.h b/riscv/insns/slli32.h deleted file mode 100644 index 71d880a..0000000 --- a/riscv/insns/slli32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_I_ULOOP(32, 5, { - pd = ps1 << imm5u; -}) diff --git a/riscv/insns/slli8.h b/riscv/insns/slli8.h deleted file mode 100644 index c997496..0000000 --- a/riscv/insns/slli8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_I_ULOOP(8, 3, { - pd = ps1 << imm3u; -}) diff --git a/riscv/insns/smal.h b/riscv/insns/smal.h deleted file mode 100644 index 09b818d..0000000 --- a/riscv/insns/smal.h +++ /dev/null @@ -1,11 +0,0 @@ -require_extension(EXT_ZPSFOPERAND); -sreg_t res = 0; -if (xlen == 32) { - res = RS1_PAIR; - res += sext_xlen(P_SH(RS2, 0) * P_SH(RS2, 1)); - WRITE_RD_PAIR(res); -} else { - res = sext_xlen(P_SH(RS2, 0) * P_SH(RS2, 1)) + - sext_xlen(P_SH(RS2, 2) * P_SH(RS2, 3)) + RS1; - WRITE_RD(res); -} diff --git a/riscv/insns/smalbb.h b/riscv/insns/smalbb.h deleted file mode 100644 index 9a2e799..0000000 --- a/riscv/insns/smalbb.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_PROFILE_REDUCTION(32, { - rd += (sreg_t)P_SH(ps1, 0) * (sreg_t)P_SH(ps2, 0); -}) diff --git a/riscv/insns/smalbt.h b/riscv/insns/smalbt.h deleted file mode 100644 index 42cf71c..0000000 --- a/riscv/insns/smalbt.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_PROFILE_REDUCTION(32, { - rd += (sreg_t)P_SH(ps1, 0) * (sreg_t)P_SH(ps2, 1); -}) diff --git a/riscv/insns/smalda.h b/riscv/insns/smalda.h deleted file mode 100644 index 8c06793..0000000 --- a/riscv/insns/smalda.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_PROFILE_REDUCTION(16, { - rd += ps1 * ps2; -}) diff --git a/riscv/insns/smaldrs.h b/riscv/insns/smaldrs.h deleted file mode 100644 index 84e1769..0000000 --- a/riscv/insns/smaldrs.h +++ /dev/null @@ -1,7 +0,0 @@ -P_64_PROFILE_REDUCTION(16, { - if (i & 1) { - rd -= ps1 * ps2; - } else { - rd += ps1 * ps2; - } -}) diff --git a/riscv/insns/smalds.h b/riscv/insns/smalds.h deleted file mode 100644 index e3cfbd7..0000000 --- a/riscv/insns/smalds.h +++ /dev/null @@ -1,7 +0,0 @@ -P_64_PROFILE_REDUCTION(16, { - if (i & 1) { - rd += ps1 * ps2; - } else { - rd -= ps1 * ps2; - } -}) diff --git a/riscv/insns/smaltt.h b/riscv/insns/smaltt.h deleted file mode 100644 index 1e654a0..0000000 --- a/riscv/insns/smaltt.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_PROFILE_REDUCTION(32, { - rd += P_SH(ps1, 1) * P_SH(ps2, 1); -}) diff --git a/riscv/insns/smalxda.h b/riscv/insns/smalxda.h deleted file mode 100644 index 77675ee..0000000 --- a/riscv/insns/smalxda.h +++ /dev/null @@ -1,4 +0,0 @@ -P_64_PROFILE_REDUCTION(32, { - rd += (sreg_t)P_SH(ps1, 0) * (sreg_t)P_SH(ps2, 1); - rd += (sreg_t)P_SH(ps1, 1) * (sreg_t)P_SH(ps2, 0); -}) diff --git a/riscv/insns/smalxds.h b/riscv/insns/smalxds.h deleted file mode 100644 index 2ae7eb5..0000000 --- a/riscv/insns/smalxds.h +++ /dev/null @@ -1,4 +0,0 @@ -P_64_PROFILE_REDUCTION(32, { - rd += (sreg_t)P_SH(ps1, 1) * (sreg_t)P_SH(ps2, 0); - rd -= (sreg_t)P_SH(ps1, 0) * (sreg_t)P_SH(ps2, 1); -}) diff --git a/riscv/insns/smaqa.h b/riscv/insns/smaqa.h deleted file mode 100644 index 83dda84..0000000 --- a/riscv/insns/smaqa.h +++ /dev/null @@ -1,3 +0,0 @@ -P_REDUCTION_LOOP(32, 8, true, false, { - pd_res += ps1 * ps2; -}) diff --git a/riscv/insns/smaqa_su.h b/riscv/insns/smaqa_su.h deleted file mode 100644 index 4ee0eb7..0000000 --- a/riscv/insns/smaqa_su.h +++ /dev/null @@ -1,3 +0,0 @@ -P_REDUCTION_SULOOP(32, 8, true, false, { - pd_res += ps1 * ps2; -}) diff --git a/riscv/insns/smar64.h b/riscv/insns/smar64.h deleted file mode 100644 index 5c5da77..0000000 --- a/riscv/insns/smar64.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_PROFILE_REDUCTION(32, { - rd += ps1 * ps2; -}) diff --git a/riscv/insns/smax16.h b/riscv/insns/smax16.h deleted file mode 100644 index 083d63c..0000000 --- a/riscv/insns/smax16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(16, { - pd = (ps1 > ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/smax32.h b/riscv/insns/smax32.h deleted file mode 100644 index 6563cfc..0000000 --- a/riscv/insns/smax32.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(32, { - pd = (ps1 > ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/smax8.h b/riscv/insns/smax8.h deleted file mode 100644 index 773039e..0000000 --- a/riscv/insns/smax8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(8, { - pd = (ps1 > ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/smbb16.h b/riscv/insns/smbb16.h deleted file mode 100644 index 0813bfb..0000000 --- a/riscv/insns/smbb16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(32, { - pd = P_SH(ps1, 0) * P_SH(ps2, 0); -}) diff --git a/riscv/insns/smbt16.h b/riscv/insns/smbt16.h deleted file mode 100644 index 953b3a6..0000000 --- a/riscv/insns/smbt16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(32, { - pd = P_SH(ps1, 0) * P_SH(ps2, 1); -}) diff --git a/riscv/insns/smbt32.h b/riscv/insns/smbt32.h deleted file mode 100644 index 35059ad..0000000 --- a/riscv/insns/smbt32.h +++ /dev/null @@ -1,3 +0,0 @@ -require_rv64; -require_extension(EXT_ZPN); -WRITE_RD((sreg_t)P_SW(RS1, 0) * P_SW(RS2, 1)); diff --git a/riscv/insns/smdrs.h b/riscv/insns/smdrs.h deleted file mode 100644 index 8f47f7d..0000000 --- a/riscv/insns/smdrs.h +++ /dev/null @@ -1,6 +0,0 @@ -P_REDUCTION_LOOP(32, 16, false, false, { - if (j & 1) - pd_res -= ps1 * ps2; - else - pd_res += ps1 * ps2; -}) diff --git a/riscv/insns/smdrs32.h b/riscv/insns/smdrs32.h deleted file mode 100644 index c397013..0000000 --- a/riscv/insns/smdrs32.h +++ /dev/null @@ -1,7 +0,0 @@ -require_rv64; -require_extension(EXT_ZPN); - -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 0); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 1); - -WRITE_RD(mres0 - mres1); diff --git a/riscv/insns/smds.h b/riscv/insns/smds.h deleted file mode 100644 index 248679a..0000000 --- a/riscv/insns/smds.h +++ /dev/null @@ -1,6 +0,0 @@ -P_REDUCTION_LOOP(32, 16, false, false, { - if (j & 1) - pd_res += ps1 * ps2; - else - pd_res -= ps1 * ps2; -}) diff --git a/riscv/insns/smds32.h b/riscv/insns/smds32.h deleted file mode 100644 index e7fdeed..0000000 --- a/riscv/insns/smds32.h +++ /dev/null @@ -1,7 +0,0 @@ -require_rv64; -require_extension(EXT_ZPN); - -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 0); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 1); - -WRITE_RD(mres1 - mres0); diff --git a/riscv/insns/smin16.h b/riscv/insns/smin16.h deleted file mode 100644 index afb1bb3..0000000 --- a/riscv/insns/smin16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(16, { - pd = (ps1 < ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/smin32.h b/riscv/insns/smin32.h deleted file mode 100644 index 22847cb..0000000 --- a/riscv/insns/smin32.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(32, { - pd = (ps1 < ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/smin8.h b/riscv/insns/smin8.h deleted file mode 100644 index 084e0e6..0000000 --- a/riscv/insns/smin8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(8, { - pd = (ps1 < ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/smmul.h b/riscv/insns/smmul.h deleted file mode 100644 index df0dd23..0000000 --- a/riscv/insns/smmul.h +++ /dev/null @@ -1,4 +0,0 @@ -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int64_t) ps2; - pd = mres >> 32; -}) diff --git a/riscv/insns/smmul_u.h b/riscv/insns/smmul_u.h deleted file mode 100644 index 55fa617..0000000 --- a/riscv/insns/smmul_u.h +++ /dev/null @@ -1,4 +0,0 @@ -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int64_t) ps2; - pd = ((mres >> 31) + 1) >> 1; -}) diff --git a/riscv/insns/smmwb.h b/riscv/insns/smmwb.h deleted file mode 100644 index f94aa9c..0000000 --- a/riscv/insns/smmwb.h +++ /dev/null @@ -1,4 +0,0 @@ -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int16_t) P_H(ps2, 0); - pd = mres >> 16; -}) diff --git a/riscv/insns/smmwb_u.h b/riscv/insns/smmwb_u.h deleted file mode 100644 index 47c6e36..0000000 --- a/riscv/insns/smmwb_u.h +++ /dev/null @@ -1,4 +0,0 @@ -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int16_t) P_H(ps2, 0); - pd = ((mres >> 15) + 1) >> 1; -}) diff --git a/riscv/insns/smmwt.h b/riscv/insns/smmwt.h deleted file mode 100644 index d8cf439..0000000 --- a/riscv/insns/smmwt.h +++ /dev/null @@ -1,4 +0,0 @@ -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int16_t) P_H(ps2, 1); - pd = mres >> 16; -}) diff --git a/riscv/insns/smmwt_u.h b/riscv/insns/smmwt_u.h deleted file mode 100644 index 5c5a671..0000000 --- a/riscv/insns/smmwt_u.h +++ /dev/null @@ -1,4 +0,0 @@ -P_LOOP(32, { - int64_t mres = (int64_t) ps1 * (int16_t) P_H(ps2, 1); - pd = ((mres >> 15) + 1) >> 1; -}) diff --git a/riscv/insns/smslda.h b/riscv/insns/smslda.h deleted file mode 100644 index f838960..0000000 --- a/riscv/insns/smslda.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_PROFILE_REDUCTION(16, { - rd -= ps1 * ps2; -}) diff --git a/riscv/insns/smslxda.h b/riscv/insns/smslxda.h deleted file mode 100644 index 7e25f9b..0000000 --- a/riscv/insns/smslxda.h +++ /dev/null @@ -1,4 +0,0 @@ -P_64_PROFILE_REDUCTION(32, { - rd -= (sreg_t)P_SH(ps1, 1) * (sreg_t)P_SH(ps2, 0); - rd -= (sreg_t)P_SH(ps1, 0) * (sreg_t)P_SH(ps2, 1); -}) diff --git a/riscv/insns/smsr64.h b/riscv/insns/smsr64.h deleted file mode 100644 index a43559f..0000000 --- a/riscv/insns/smsr64.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_PROFILE_REDUCTION(32, { - rd -= ps1 * ps2; -}) diff --git a/riscv/insns/smtt16.h b/riscv/insns/smtt16.h deleted file mode 100644 index e19c50a..0000000 --- a/riscv/insns/smtt16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(32, { - pd = P_SH(ps1, 1) * P_SH(ps2, 1); -}) diff --git a/riscv/insns/smtt32.h b/riscv/insns/smtt32.h deleted file mode 100644 index c7fd9e7..0000000 --- a/riscv/insns/smtt32.h +++ /dev/null @@ -1,3 +0,0 @@ -require_rv64; -require_extension(EXT_ZPN); -WRITE_RD((sreg_t)P_SW(RS1, 1) * P_SW(RS2, 1)); diff --git a/riscv/insns/smul16.h b/riscv/insns/smul16.h deleted file mode 100644 index 7e0f08a..0000000 --- a/riscv/insns/smul16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_MUL_LOOP(16, { - pd = (int32_t)ps1 * (int32_t)ps2; -}) diff --git a/riscv/insns/smul8.h b/riscv/insns/smul8.h deleted file mode 100644 index a4a3ed9..0000000 --- a/riscv/insns/smul8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_MUL_LOOP(8, { - pd = (int16_t)ps1 * (int16_t)ps2; -}) diff --git a/riscv/insns/smulx16.h b/riscv/insns/smulx16.h deleted file mode 100644 index 58e9a08..0000000 --- a/riscv/insns/smulx16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_MUL_CROSS_LOOP(16, { - pd = (int32_t)ps1 * (int32_t)ps2; -}) diff --git a/riscv/insns/smulx8.h b/riscv/insns/smulx8.h deleted file mode 100644 index 9270ce3..0000000 --- a/riscv/insns/smulx8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_MUL_CROSS_LOOP(8, { - pd = (int16_t)ps1 * (int16_t)ps2; -}) diff --git a/riscv/insns/smxds.h b/riscv/insns/smxds.h deleted file mode 100644 index 845d01f..0000000 --- a/riscv/insns/smxds.h +++ /dev/null @@ -1,6 +0,0 @@ -P_REDUCTION_CROSS_LOOP(32, 16, false, false, { - if (j & 1) - pd_res += ps1 * ps2; - else - pd_res -= ps1 * ps2; -}) diff --git a/riscv/insns/smxds32.h b/riscv/insns/smxds32.h deleted file mode 100644 index 8eeedcf..0000000 --- a/riscv/insns/smxds32.h +++ /dev/null @@ -1,7 +0,0 @@ -require_rv64; -require_extension(EXT_ZPN); - -sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 1); -sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 0); - -WRITE_RD(mres1 - mres0); diff --git a/riscv/insns/sra16.h b/riscv/insns/sra16.h deleted file mode 100644 index 84a40fb..0000000 --- a/riscv/insns/sra16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_X_LOOP(16, 4, { - pd = ps1 >> sa; -}) diff --git a/riscv/insns/sra16_u.h b/riscv/insns/sra16_u.h deleted file mode 100644 index 6fcc398..0000000 --- a/riscv/insns/sra16_u.h +++ /dev/null @@ -1,6 +0,0 @@ -P_X_LOOP(16, 4, { - if (sa > 0) - pd = ((ps1 >> (sa - 1)) + 1) >> 1; - else - pd = ps1; -}) diff --git a/riscv/insns/sra32.h b/riscv/insns/sra32.h deleted file mode 100644 index 8b192e0..0000000 --- a/riscv/insns/sra32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_X_LOOP(32, 5, { - pd = ps1 >> sa; -}) diff --git a/riscv/insns/sra32_u.h b/riscv/insns/sra32_u.h deleted file mode 100644 index 1a4488c..0000000 --- a/riscv/insns/sra32_u.h +++ /dev/null @@ -1,7 +0,0 @@ -require_rv64; -P_X_LOOP(32, 5, { - if (sa > 0) - pd = (((uint64_t)(ps1 >> (sa - 1))) + 1) >> 1; - else - pd = ps1; -}) diff --git a/riscv/insns/sra8.h b/riscv/insns/sra8.h deleted file mode 100644 index de1bd64..0000000 --- a/riscv/insns/sra8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_X_LOOP(8, 3, { - pd = ps1 >> sa; -}) diff --git a/riscv/insns/sra8_u.h b/riscv/insns/sra8_u.h deleted file mode 100644 index 1f47623..0000000 --- a/riscv/insns/sra8_u.h +++ /dev/null @@ -1,6 +0,0 @@ -P_X_LOOP(8, 3, { - if (sa > 0) - pd = ((ps1 >> (sa - 1)) + 1) >> 1; - else - pd = ps1; -}) diff --git a/riscv/insns/sra_u.h b/riscv/insns/sra_u.h deleted file mode 100644 index d7c395b..0000000 --- a/riscv/insns/sra_u.h +++ /dev/null @@ -1,9 +0,0 @@ -require_extension(EXT_ZPN); -sreg_t rs1 = sext_xlen(RS1); -reg_t sa = get_field(RS2, make_mask64(0, xlen == 32 ? 5 : 6)); - -if (sa > 0) { - WRITE_RD(sext_xlen(((rs1 >> (sa - 1)) + 1) >> 1)); -} else { - WRITE_RD(sext_xlen(rs1)); -} diff --git a/riscv/insns/srai16.h b/riscv/insns/srai16.h deleted file mode 100644 index 63f9807..0000000 --- a/riscv/insns/srai16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_I_LOOP(16, 4, { - pd = ps1 >> imm4u; -}) diff --git a/riscv/insns/srai16_u.h b/riscv/insns/srai16_u.h deleted file mode 100644 index d783581..0000000 --- a/riscv/insns/srai16_u.h +++ /dev/null @@ -1,6 +0,0 @@ -P_I_LOOP(16, 4, { - if (imm4u > 0) - pd = ((ps1 >> (imm4u - 1)) + 1) >> 1; - else - pd = ps1; -}) diff --git a/riscv/insns/srai32.h b/riscv/insns/srai32.h deleted file mode 100644 index 9058ba9..0000000 --- a/riscv/insns/srai32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_I_LOOP(32, 5, { - pd = ps1 >> imm5u; -}) diff --git a/riscv/insns/srai32_u.h b/riscv/insns/srai32_u.h deleted file mode 100644 index a5fe4d3..0000000 --- a/riscv/insns/srai32_u.h +++ /dev/null @@ -1,7 +0,0 @@ -require_rv64; -P_I_LOOP(32, 5, { - if (imm5u > 0) - pd = (((uint64_t)(ps1 >> (imm5u - 1))) + 1) >> 1; - else - pd = ps1; -}) diff --git a/riscv/insns/srai8.h b/riscv/insns/srai8.h deleted file mode 100644 index 0141933..0000000 --- a/riscv/insns/srai8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_I_LOOP(8, 3, { - pd = ps1 >> imm3u; -}) diff --git a/riscv/insns/srai8_u.h b/riscv/insns/srai8_u.h deleted file mode 100644 index be7bfaf..0000000 --- a/riscv/insns/srai8_u.h +++ /dev/null @@ -1,6 +0,0 @@ -P_I_LOOP(8, 3, { - if (imm3u > 0) - pd = ((ps1 >> (imm3u - 1)) + 1) >> 1; - else - pd = ps1; -}) diff --git a/riscv/insns/srai_u.h b/riscv/insns/srai_u.h deleted file mode 100644 index f170083..0000000 --- a/riscv/insns/srai_u.h +++ /dev/null @@ -1,10 +0,0 @@ -require_extension(EXT_ZPN); -sreg_t rs1 = sext_xlen(RS1); -reg_t sa = insn.p_imm6(); -require(sa < (unsigned long)xlen); // imm[5] == 1 is illegal on rv32 - -if (sa > 0) { - WRITE_RD(sext_xlen(((rs1 >> (sa - 1)) + 1) >> 1)); -} else { - WRITE_RD(sext_xlen(rs1)); -} diff --git a/riscv/insns/sraiw_u.h b/riscv/insns/sraiw_u.h deleted file mode 100644 index 3559d7f..0000000 --- a/riscv/insns/sraiw_u.h +++ /dev/null @@ -1,9 +0,0 @@ -require_rv64; -require_extension(EXT_ZPN); - -reg_t sa = insn.p_imm5(); -if (sa != 0) { - WRITE_RD(sext32(((P_SW(RS1, 0) >> (sa - 1)) + 1) >> 1)); -} else { - WRITE_RD(sext32(P_SW(RS1, 0))); -} diff --git a/riscv/insns/srl16.h b/riscv/insns/srl16.h deleted file mode 100644 index 35f9cec..0000000 --- a/riscv/insns/srl16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_X_ULOOP(16, 4, { - pd = ps1 >> sa; -}) diff --git a/riscv/insns/srl16_u.h b/riscv/insns/srl16_u.h deleted file mode 100644 index 17d1bc0..0000000 --- a/riscv/insns/srl16_u.h +++ /dev/null @@ -1,7 +0,0 @@ -P_X_ULOOP(16, 4, { - if (sa > 0) { - pd = ((ps1 >> (sa - 1)) + 1) >> 1; - } else { - pd = ps1; - } -}) diff --git a/riscv/insns/srl32.h b/riscv/insns/srl32.h deleted file mode 100644 index 2ad116c..0000000 --- a/riscv/insns/srl32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_X_ULOOP(32, 5, { - pd = ps1 >> sa; -}) diff --git a/riscv/insns/srl32_u.h b/riscv/insns/srl32_u.h deleted file mode 100644 index d637546..0000000 --- a/riscv/insns/srl32_u.h +++ /dev/null @@ -1,8 +0,0 @@ -require_rv64; -P_X_ULOOP(32, 5, { - if (sa > 0) { - pd = (((uint64_t)(ps1 >> (sa - 1))) + 1) >> 1; - } else { - pd = ps1; - } -}) diff --git a/riscv/insns/srl8.h b/riscv/insns/srl8.h deleted file mode 100644 index f7d74a9..0000000 --- a/riscv/insns/srl8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_X_ULOOP(8, 3, { - pd = ps1 >> sa; -}) diff --git a/riscv/insns/srl8_u.h b/riscv/insns/srl8_u.h deleted file mode 100644 index 26415a5..0000000 --- a/riscv/insns/srl8_u.h +++ /dev/null @@ -1,7 +0,0 @@ -P_X_ULOOP(8, 3, { - if (sa > 0) { - pd = ((ps1 >> (sa - 1)) + 1) >> 1; - } else { - pd = ps1; - } -}) diff --git a/riscv/insns/srli16.h b/riscv/insns/srli16.h deleted file mode 100644 index cbd685f..0000000 --- a/riscv/insns/srli16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_I_ULOOP(16, 4, { - pd = ps1 >> imm4u; -}) diff --git a/riscv/insns/srli16_u.h b/riscv/insns/srli16_u.h deleted file mode 100644 index 2ba533a..0000000 --- a/riscv/insns/srli16_u.h +++ /dev/null @@ -1,7 +0,0 @@ -P_I_ULOOP(16, 4, { - if (imm4u > 0) { - pd = ((ps1 >> (imm4u - 1)) + 1) >> 1; - } else { - pd = ps1; - } -}) diff --git a/riscv/insns/srli32.h b/riscv/insns/srli32.h deleted file mode 100644 index f3d53af..0000000 --- a/riscv/insns/srli32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_I_ULOOP(32, 5, { - pd = ps1 >> imm5u; -}) diff --git a/riscv/insns/srli32_u.h b/riscv/insns/srli32_u.h deleted file mode 100644 index 6d2327f..0000000 --- a/riscv/insns/srli32_u.h +++ /dev/null @@ -1,8 +0,0 @@ -require_rv64; -P_I_ULOOP(32, 5, { - if (imm5u > 0) { - pd = (((uint64_t)(ps1 >> (imm5u - 1))) + 1) >> 1; - } else { - pd = ps1; - } -}) diff --git a/riscv/insns/srli8.h b/riscv/insns/srli8.h deleted file mode 100644 index 103f0ed..0000000 --- a/riscv/insns/srli8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_I_ULOOP(8, 3, { - pd = ps1 >> imm3u; -}) diff --git a/riscv/insns/srli8_u.h b/riscv/insns/srli8_u.h deleted file mode 100644 index 9fa7f8c..0000000 --- a/riscv/insns/srli8_u.h +++ /dev/null @@ -1,7 +0,0 @@ -P_I_ULOOP(8, 3, { - if (imm3u > 0) { - pd = ((ps1 >> (imm3u - 1)) + 1) >> 1; - } else { - pd = ps1; - } -}) diff --git a/riscv/insns/stas16.h b/riscv/insns/stas16.h deleted file mode 100644 index 949e5c8..0000000 --- a/riscv/insns/stas16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_STRAIGHT_LOOP(16, { - pd = ps1 + ps2; -}, { - pd = ps1 - ps2; -}) diff --git a/riscv/insns/stas32.h b/riscv/insns/stas32.h deleted file mode 100644 index 2009a69..0000000 --- a/riscv/insns/stas32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_STRAIGHT_LOOP(32, { - pd = ps1 + ps2; -}, { - pd = ps1 - ps2; -}) diff --git a/riscv/insns/stsa16.h b/riscv/insns/stsa16.h deleted file mode 100644 index 7e4371d..0000000 --- a/riscv/insns/stsa16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_STRAIGHT_LOOP(16, { - pd = ps1 - ps2; -}, { - pd = ps1 + ps2; -}) diff --git a/riscv/insns/stsa32.h b/riscv/insns/stsa32.h deleted file mode 100644 index e2d81b7..0000000 --- a/riscv/insns/stsa32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_STRAIGHT_LOOP(32, { - pd = ps1 - ps2; -}, { - pd = ps1 + ps2; -}) diff --git a/riscv/insns/sub16.h b/riscv/insns/sub16.h deleted file mode 100644 index 5d36aaf..0000000 --- a/riscv/insns/sub16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(16, { - pd = ps1 - ps2; -}) diff --git a/riscv/insns/sub32.h b/riscv/insns/sub32.h deleted file mode 100644 index 70bbc53..0000000 --- a/riscv/insns/sub32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_LOOP(32, { - pd = ps1 - ps2; -}) diff --git a/riscv/insns/sub64.h b/riscv/insns/sub64.h deleted file mode 100644 index d977526..0000000 --- a/riscv/insns/sub64.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_PROFILE({ - rd = rs1 - rs2; -}) diff --git a/riscv/insns/sub8.h b/riscv/insns/sub8.h deleted file mode 100644 index 7f13d61..0000000 --- a/riscv/insns/sub8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_LOOP(8, { - pd = ps1 - ps2; -}) diff --git a/riscv/insns/sunpkd810.h b/riscv/insns/sunpkd810.h deleted file mode 100644 index 2a2f7c3..0000000 --- a/riscv/insns/sunpkd810.h +++ /dev/null @@ -1 +0,0 @@ -P_SUNPKD8(1, 0) diff --git a/riscv/insns/sunpkd820.h b/riscv/insns/sunpkd820.h deleted file mode 100644 index 84d5248..0000000 --- a/riscv/insns/sunpkd820.h +++ /dev/null @@ -1 +0,0 @@ -P_SUNPKD8(2, 0) diff --git a/riscv/insns/sunpkd830.h b/riscv/insns/sunpkd830.h deleted file mode 100644 index 8817907..0000000 --- a/riscv/insns/sunpkd830.h +++ /dev/null @@ -1 +0,0 @@ -P_SUNPKD8(3, 0) diff --git a/riscv/insns/sunpkd831.h b/riscv/insns/sunpkd831.h deleted file mode 100644 index 98ed748..0000000 --- a/riscv/insns/sunpkd831.h +++ /dev/null @@ -1 +0,0 @@ -P_SUNPKD8(3, 1) diff --git a/riscv/insns/sunpkd832.h b/riscv/insns/sunpkd832.h deleted file mode 100644 index b0ac29f..0000000 --- a/riscv/insns/sunpkd832.h +++ /dev/null @@ -1 +0,0 @@ -P_SUNPKD8(3, 2) diff --git a/riscv/insns/uclip16.h b/riscv/insns/uclip16.h deleted file mode 100644 index 4cc2519..0000000 --- a/riscv/insns/uclip16.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -P_I_LOOP(16, 4, { - int64_t uint_max = imm4u ? UINT64_MAX >> (64 - imm4u) : 0; - pd = ps1; - - if (ps1 > uint_max) { - pd = uint_max; - P_SET_OV(1); - } else if (ps1 < 0) { - pd = 0; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/uclip32.h b/riscv/insns/uclip32.h deleted file mode 100644 index d347650..0000000 --- a/riscv/insns/uclip32.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -P_I_LOOP(32, 5, { - int64_t uint_max = imm5u ? UINT64_MAX >> (64 - imm5u) : 0; - pd = ps1; - - if (ps1 > uint_max) { - pd = uint_max; - P_SET_OV(1); - } else if (ps1 < 0) { - pd = 0; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/uclip8.h b/riscv/insns/uclip8.h deleted file mode 100644 index b8a95c0..0000000 --- a/riscv/insns/uclip8.h +++ /dev/null @@ -1,13 +0,0 @@ -require_vector_vs; -P_I_LOOP(8, 3, { - int64_t uint_max = imm3u ? UINT64_MAX >> (64 - imm3u) : 0; - pd = ps1; - - if (ps1 > uint_max) { - pd = uint_max; - P_SET_OV(1); - } else if (ps1 < 0) { - pd = 0; - P_SET_OV(1); - } -}) diff --git a/riscv/insns/ucmple16.h b/riscv/insns/ucmple16.h deleted file mode 100644 index fe2b93f..0000000 --- a/riscv/insns/ucmple16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(16, { - pd = (ps1 <= ps2) ? -1 : 0; -}) diff --git a/riscv/insns/ucmple8.h b/riscv/insns/ucmple8.h deleted file mode 100644 index bd44cb0..0000000 --- a/riscv/insns/ucmple8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(8, { - pd = (ps1 <= ps2) ? -1 : 0; -}) diff --git a/riscv/insns/ucmplt16.h b/riscv/insns/ucmplt16.h deleted file mode 100644 index fa7512c..0000000 --- a/riscv/insns/ucmplt16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(16, { - pd = (ps1 < ps2) ? -1 : 0; -}) diff --git a/riscv/insns/ucmplt8.h b/riscv/insns/ucmplt8.h deleted file mode 100644 index 6fa85b1..0000000 --- a/riscv/insns/ucmplt8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(8, { - pd = (ps1 < ps2) ? -1 : 0; -}) diff --git a/riscv/insns/ukadd16.h b/riscv/insns/ukadd16.h deleted file mode 100644 index 680b5b6..0000000 --- a/riscv/insns/ukadd16.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_ULOOP(16, { - bool sat = false; - pd = (sat_addu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukadd32.h b/riscv/insns/ukadd32.h deleted file mode 100644 index dd836c1..0000000 --- a/riscv/insns/ukadd32.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -require_rv64; -P_ULOOP(32, { - bool sat = false; - pd = (sat_addu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukadd64.h b/riscv/insns/ukadd64.h deleted file mode 100644 index d7e98f3..0000000 --- a/riscv/insns/ukadd64.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_64_UPROFILE({ - bool sat = false; - rd = (sat_addu<uint64_t>(rs1, rs2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukadd8.h b/riscv/insns/ukadd8.h deleted file mode 100644 index 4bcada2..0000000 --- a/riscv/insns/ukadd8.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_ULOOP(8, { - bool sat = false; - pd = (sat_addu<uint8_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukaddh.h b/riscv/insns/ukaddh.h deleted file mode 100644 index 30c970a..0000000 --- a/riscv/insns/ukaddh.h +++ /dev/null @@ -1,5 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_H(RS1, 0) + (sreg_t)P_H(RS2, 0); -P_SATU(res, 16); -WRITE_RD(sext_xlen((int16_t)res)); diff --git a/riscv/insns/ukaddw.h b/riscv/insns/ukaddw.h deleted file mode 100644 index 5d4d91e..0000000 --- a/riscv/insns/ukaddw.h +++ /dev/null @@ -1,5 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_W(RS1, 0) + (sreg_t)P_W(RS2, 0); -P_SATU(res, 32); -WRITE_RD(sext32(res)); diff --git a/riscv/insns/ukcras16.h b/riscv/insns/ukcras16.h deleted file mode 100644 index 54b9a10..0000000 --- a/riscv/insns/ukcras16.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_CROSS_ULOOP(16, { - bool sat = false; - pd = (sat_addu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_subu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukcras32.h b/riscv/insns/ukcras32.h deleted file mode 100644 index 001644c..0000000 --- a/riscv/insns/ukcras32.h +++ /dev/null @@ -1,11 +0,0 @@ -require_vector_vs; -require_rv64; -P_CROSS_ULOOP(32, { - bool sat = false; - pd = (sat_addu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_subu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukcrsa16.h b/riscv/insns/ukcrsa16.h deleted file mode 100644 index 343063c..0000000 --- a/riscv/insns/ukcrsa16.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_CROSS_ULOOP(16, { - bool sat = false; - pd = (sat_subu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_addu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukcrsa32.h b/riscv/insns/ukcrsa32.h deleted file mode 100644 index 260f181..0000000 --- a/riscv/insns/ukcrsa32.h +++ /dev/null @@ -1,11 +0,0 @@ -require_vector_vs; -require_rv64; -P_CROSS_ULOOP(32, { - bool sat = false; - pd = (sat_subu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_addu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukmar64.h b/riscv/insns/ukmar64.h deleted file mode 100644 index e33ad7d..0000000 --- a/riscv/insns/ukmar64.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_64_UPROFILE_REDUCTION(32, { - bool sat = false; - rd = (sat_addu<uint64_t>(rd, ps1 * ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukmsr64.h b/riscv/insns/ukmsr64.h deleted file mode 100644 index 9a38cb0..0000000 --- a/riscv/insns/ukmsr64.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_64_UPROFILE_REDUCTION(32, { - bool sat = false; - rd = (sat_subu<uint64_t>(rd, ps1 * ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukstas16.h b/riscv/insns/ukstas16.h deleted file mode 100644 index a8203e4..0000000 --- a/riscv/insns/ukstas16.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_STRAIGHT_ULOOP(16, { - bool sat = false; - pd = (sat_addu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_subu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukstas32.h b/riscv/insns/ukstas32.h deleted file mode 100644 index c734eb6..0000000 --- a/riscv/insns/ukstas32.h +++ /dev/null @@ -1,11 +0,0 @@ -require_vector_vs; -require_rv64; -P_STRAIGHT_ULOOP(32, { - bool sat = false; - pd = (sat_addu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_subu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukstsa16.h b/riscv/insns/ukstsa16.h deleted file mode 100644 index 8145111..0000000 --- a/riscv/insns/ukstsa16.h +++ /dev/null @@ -1,10 +0,0 @@ -require_vector_vs; -P_STRAIGHT_ULOOP(16, { - bool sat = false; - pd = (sat_subu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_addu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/ukstsa32.h b/riscv/insns/ukstsa32.h deleted file mode 100644 index 9eb713e..0000000 --- a/riscv/insns/ukstsa32.h +++ /dev/null @@ -1,11 +0,0 @@ -require_vector_vs; -require_rv64; -P_STRAIGHT_ULOOP(32, { - bool sat = false; - pd = (sat_subu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}, { - bool sat = false; - pd = (sat_addu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/uksub16.h b/riscv/insns/uksub16.h deleted file mode 100644 index 7fba16e..0000000 --- a/riscv/insns/uksub16.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_ULOOP(16, { - bool sat = false; - pd = (sat_subu<uint16_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/uksub32.h b/riscv/insns/uksub32.h deleted file mode 100644 index 3d4913b..0000000 --- a/riscv/insns/uksub32.h +++ /dev/null @@ -1,7 +0,0 @@ -require_vector_vs; -require_rv64; -P_ULOOP(32, { - bool sat = false; - pd = (sat_subu<uint32_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/uksub64.h b/riscv/insns/uksub64.h deleted file mode 100644 index 0d2bb05..0000000 --- a/riscv/insns/uksub64.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_64_UPROFILE({ - bool sat = false; - rd = (sat_subu<uint64_t>(rs1, rs2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/uksub8.h b/riscv/insns/uksub8.h deleted file mode 100644 index f26621e..0000000 --- a/riscv/insns/uksub8.h +++ /dev/null @@ -1,6 +0,0 @@ -require_vector_vs; -P_ULOOP(8, { - bool sat = false; - pd = (sat_subu<uint8_t>(ps1, ps2, sat)); - P_SET_OV(sat); -}) diff --git a/riscv/insns/uksubh.h b/riscv/insns/uksubh.h deleted file mode 100644 index ac23989..0000000 --- a/riscv/insns/uksubh.h +++ /dev/null @@ -1,5 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_H(RS1, 0) - (sreg_t)P_H(RS2, 0); -P_SATU(res, 16); -WRITE_RD(sext_xlen((int16_t)res)); diff --git a/riscv/insns/uksubw.h b/riscv/insns/uksubw.h deleted file mode 100644 index 41a32e7..0000000 --- a/riscv/insns/uksubw.h +++ /dev/null @@ -1,5 +0,0 @@ -require_vector_vs; -require_extension(EXT_ZPN); -sreg_t res = (sreg_t)P_W(RS1, 0) - (sreg_t)P_W(RS2, 0); -P_SATU(res, 32); -WRITE_RD(sext32(res)); diff --git a/riscv/insns/umaqa.h b/riscv/insns/umaqa.h deleted file mode 100644 index 474b174..0000000 --- a/riscv/insns/umaqa.h +++ /dev/null @@ -1,3 +0,0 @@ -P_REDUCTION_ULOOP(32, 8, true, false, { - pd_res += ps1 * ps2; -}) diff --git a/riscv/insns/umar64.h b/riscv/insns/umar64.h deleted file mode 100644 index 0a8a352..0000000 --- a/riscv/insns/umar64.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_UPROFILE_REDUCTION(32, { - rd += ps1 * ps2; -}) diff --git a/riscv/insns/umax16.h b/riscv/insns/umax16.h deleted file mode 100644 index e60ed4a..0000000 --- a/riscv/insns/umax16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(16, { - pd = (ps1 > ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/umax32.h b/riscv/insns/umax32.h deleted file mode 100644 index 6156345..0000000 --- a/riscv/insns/umax32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_ULOOP(32, { - pd = (ps1 > ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/umax8.h b/riscv/insns/umax8.h deleted file mode 100644 index 8a575a6..0000000 --- a/riscv/insns/umax8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(8, { - pd = (ps1 > ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/umin16.h b/riscv/insns/umin16.h deleted file mode 100644 index d414211..0000000 --- a/riscv/insns/umin16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(16, { - pd = (ps1 < ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/umin32.h b/riscv/insns/umin32.h deleted file mode 100644 index 9669945..0000000 --- a/riscv/insns/umin32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_ULOOP(32, { - pd = (ps1 < ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/umin8.h b/riscv/insns/umin8.h deleted file mode 100644 index bea8ccd..0000000 --- a/riscv/insns/umin8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(8, { - pd = (ps1 < ps2) ? ps1 : ps2; -}) diff --git a/riscv/insns/umsr64.h b/riscv/insns/umsr64.h deleted file mode 100644 index 0e186d9..0000000 --- a/riscv/insns/umsr64.h +++ /dev/null @@ -1,3 +0,0 @@ -P_64_UPROFILE_REDUCTION(32, { - rd -= ps1 * ps2; -}) diff --git a/riscv/insns/umul16.h b/riscv/insns/umul16.h deleted file mode 100644 index 09b839c..0000000 --- a/riscv/insns/umul16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_MUL_ULOOP(16, { - pd = (uint32_t)ps1 * (uint32_t)ps2; -}) diff --git a/riscv/insns/umul8.h b/riscv/insns/umul8.h deleted file mode 100644 index 29cae88..0000000 --- a/riscv/insns/umul8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_MUL_ULOOP(8, { - pd = (uint16_t)ps1 * (uint16_t)ps2; -}) diff --git a/riscv/insns/umulx16.h b/riscv/insns/umulx16.h deleted file mode 100644 index 3f0cce8..0000000 --- a/riscv/insns/umulx16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_MUL_CROSS_ULOOP(16, { - pd = (uint32_t)ps1 * (uint32_t)ps2; -}) diff --git a/riscv/insns/umulx8.h b/riscv/insns/umulx8.h deleted file mode 100644 index 848b5d5..0000000 --- a/riscv/insns/umulx8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_MUL_CROSS_ULOOP(8, { - pd = (uint16_t)ps1 * (uint16_t)ps2; -}) diff --git a/riscv/insns/uradd16.h b/riscv/insns/uradd16.h deleted file mode 100644 index 29610bf..0000000 --- a/riscv/insns/uradd16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(16, { - pd = (ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/uradd32.h b/riscv/insns/uradd32.h deleted file mode 100644 index 4f791d9..0000000 --- a/riscv/insns/uradd32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_ULOOP(32, { - pd = ((uint64_t)ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/uradd64.h b/riscv/insns/uradd64.h deleted file mode 100644 index f6787e1..0000000 --- a/riscv/insns/uradd64.h +++ /dev/null @@ -1,9 +0,0 @@ -P_64_UPROFILE({ - rd = rs1 + rs2; - if (rd < rs1) { - rd >>= 1; - rd |= ((reg_t)1 << 63); - } else { - rd >>= 1; - } -}) diff --git a/riscv/insns/uradd8.h b/riscv/insns/uradd8.h deleted file mode 100644 index 412e3d5..0000000 --- a/riscv/insns/uradd8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(8, { - pd = (ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/uraddw.h b/riscv/insns/uraddw.h deleted file mode 100644 index 6a9455f..0000000 --- a/riscv/insns/uraddw.h +++ /dev/null @@ -1,4 +0,0 @@ -require_extension(EXT_ZPN); -reg_t res = (reg_t)P_W(RS1, 0) + (reg_t)P_W(RS2, 0); -res >>= 1; -WRITE_RD(sext_xlen((int32_t)res)); diff --git a/riscv/insns/urcras16.h b/riscv/insns/urcras16.h deleted file mode 100644 index 2bac315..0000000 --- a/riscv/insns/urcras16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_CROSS_ULOOP(16, { - pd = (ps1 + ps2) >> 1; -}, { - pd = (ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/urcras32.h b/riscv/insns/urcras32.h deleted file mode 100644 index a08e877..0000000 --- a/riscv/insns/urcras32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_CROSS_ULOOP(32, { - pd = ((uint64_t)ps1 + ps2) >> 1; -}, { - pd = ((uint64_t)ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/urcrsa16.h b/riscv/insns/urcrsa16.h deleted file mode 100644 index a890990..0000000 --- a/riscv/insns/urcrsa16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_CROSS_ULOOP(16, { - pd = (ps1 - ps2) >> 1; -}, { - pd = (ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/urcrsa32.h b/riscv/insns/urcrsa32.h deleted file mode 100644 index 7ddd4f9..0000000 --- a/riscv/insns/urcrsa32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_CROSS_ULOOP(32, { - pd = ((uint64_t)ps1 - ps2) >> 1; -}, { - pd = ((uint64_t)ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/urstas16.h b/riscv/insns/urstas16.h deleted file mode 100644 index 3cc89d8..0000000 --- a/riscv/insns/urstas16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_STRAIGHT_ULOOP(16, { - pd = (ps1 + ps2) >> 1; -}, { - pd = (ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/urstas32.h b/riscv/insns/urstas32.h deleted file mode 100644 index 668fa66..0000000 --- a/riscv/insns/urstas32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_STRAIGHT_ULOOP(32, { - pd = ((uint64_t)ps1 + ps2) >> 1; -}, { - pd = ((uint64_t)ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/urstsa16.h b/riscv/insns/urstsa16.h deleted file mode 100644 index a88bcf1..0000000 --- a/riscv/insns/urstsa16.h +++ /dev/null @@ -1,5 +0,0 @@ -P_STRAIGHT_ULOOP(16, { - pd = (ps1 - ps2) >> 1; -}, { - pd = (ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/urstsa32.h b/riscv/insns/urstsa32.h deleted file mode 100644 index 097337c..0000000 --- a/riscv/insns/urstsa32.h +++ /dev/null @@ -1,6 +0,0 @@ -require_rv64; -P_STRAIGHT_ULOOP(32, { - pd = ((uint64_t)ps1 - ps2) >> 1; -}, { - pd = ((uint64_t)ps1 + ps2) >> 1; -}) diff --git a/riscv/insns/ursub16.h b/riscv/insns/ursub16.h deleted file mode 100644 index bcd09f0..0000000 --- a/riscv/insns/ursub16.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(16, { - pd = (ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/ursub32.h b/riscv/insns/ursub32.h deleted file mode 100644 index 215436d..0000000 --- a/riscv/insns/ursub32.h +++ /dev/null @@ -1,4 +0,0 @@ -require_rv64; -P_ULOOP(32, { - pd = ((uint64_t)ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/ursub64.h b/riscv/insns/ursub64.h deleted file mode 100644 index 3d845a0..0000000 --- a/riscv/insns/ursub64.h +++ /dev/null @@ -1,9 +0,0 @@ -P_64_UPROFILE({ - rd = rs1 - rs2; - if (rd > rs1) { - rd >>= 1; - rd |= ((reg_t)1 << 63); - } else { - rd >>= 1; - } -}) diff --git a/riscv/insns/ursub8.h b/riscv/insns/ursub8.h deleted file mode 100644 index d66a995..0000000 --- a/riscv/insns/ursub8.h +++ /dev/null @@ -1,3 +0,0 @@ -P_ULOOP(8, { - pd = (ps1 - ps2) >> 1; -}) diff --git a/riscv/insns/ursubw.h b/riscv/insns/ursubw.h deleted file mode 100644 index 5c90fde..0000000 --- a/riscv/insns/ursubw.h +++ /dev/null @@ -1,4 +0,0 @@ -require_extension(EXT_ZPN); -reg_t res = (reg_t)P_W(RS1, 0) - (reg_t)P_W(RS2, 0); -res >>= 1; -WRITE_RD(sext_xlen((int32_t)res)); diff --git a/riscv/insns/zunpkd810.h b/riscv/insns/zunpkd810.h deleted file mode 100644 index 88434de..0000000 --- a/riscv/insns/zunpkd810.h +++ /dev/null @@ -1 +0,0 @@ -P_ZUNPKD8(1, 0) diff --git a/riscv/insns/zunpkd820.h b/riscv/insns/zunpkd820.h deleted file mode 100644 index f206508..0000000 --- a/riscv/insns/zunpkd820.h +++ /dev/null @@ -1 +0,0 @@ -P_ZUNPKD8(2, 0) diff --git a/riscv/insns/zunpkd830.h b/riscv/insns/zunpkd830.h deleted file mode 100644 index 1365514..0000000 --- a/riscv/insns/zunpkd830.h +++ /dev/null @@ -1 +0,0 @@ -P_ZUNPKD8(3, 0) diff --git a/riscv/insns/zunpkd831.h b/riscv/insns/zunpkd831.h deleted file mode 100644 index 8febe77..0000000 --- a/riscv/insns/zunpkd831.h +++ /dev/null @@ -1 +0,0 @@ -P_ZUNPKD8(3, 1) diff --git a/riscv/insns/zunpkd832.h b/riscv/insns/zunpkd832.h deleted file mode 100644 index f14030b..0000000 --- a/riscv/insns/zunpkd832.h +++ /dev/null @@ -1 +0,0 @@ -P_ZUNPKD8(3, 2) |