diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-01-17 18:40:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-17 11:40:18 +0100 |
| commit | 6827fc6cc9ca349c3c811bd39aa4a0a9a2c4dbe3 (patch) | |
| tree | a9329404e2f18e7b1cac2a62ab5e41fa265cf323 /src | |
| parent | cff47982495555cad061950eb153458327e2802b (diff) | |
| download | box64-6827fc6cc9ca349c3c811bd39aa4a0a9a2c4dbe3.tar.gz box64-6827fc6cc9ca349c3c811bd39aa4a0a9a2c4dbe3.zip | |
[RV64_DYNAREC] Refined printer for more thead instructions (#2272)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynarec/rv64/rv64_printer.c | 571 |
1 files changed, 557 insertions, 14 deletions
diff --git a/src/dynarec/rv64/rv64_printer.c b/src/dynarec/rv64/rv64_printer.c index 3dc619ab..a98a0cbb 100644 --- a/src/dynarec/rv64/rv64_printer.c +++ b/src/dynarec/rv64/rv64_printer.c @@ -193,7 +193,7 @@ const char* rv64_print(uint32_t opcode, uintptr_t addr) /**************** * Generated by https://github.com/ksco/riscv-opcodes/tree/box64_printer - * Command: python parse.py -box64 rv_xtheadba rv_xtheadbb rv_xtheadbs rv_xtheadcondmov rv_xtheadmempair > code.c + * Command: python parse.py -box64 rv_xtheadba rv_xtheadbb rv_xtheadbs rv_xtheadcondmov rv_xtheadmempair rv_xtheadmemidx > code.c * Please do NOT edit the following code manually. */ @@ -202,8 +202,8 @@ const char* rv64_print(uint32_t opcode, uintptr_t addr) a.rd = FX(opcode, 11, 7); a.rs1 = FX(opcode, 19, 15); a.rs2 = FX(opcode, 24, 20); - a.imm = FX(opcode, 26, 25); - snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.ADDSL", gpr[a.rd], gpr[a.rs1], gpr[a.rs2], a.imm, a.imm); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.ADDSL", gpr[a.rd], gpr[a.rs1], gpr[a.rs2], a.imm2, a.imm2); return buff; } @@ -243,13 +243,63 @@ const char* rv64_print(uint32_t opcode, uintptr_t addr) return buff; } + // rv_xtheadmemidx, TH.LBIA + if ((opcode & 0xf800707f) == 0x1800400b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.LBIA", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); + return buff; + } + + // rv_xtheadmemidx, TH.LBUIA + if ((opcode & 0xf800707f) == 0x9800400b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.LBUIA", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); + return buff; + } + // rv_xtheadmempair, TH.LDD if ((opcode & 0xf800707f) == 0xf800400b) { a.rd = FX(opcode, 11, 7); a.rs2 = FX(opcode, 24, 20); a.rs1 = FX(opcode, 19, 15); - a.imm = FX(opcode, 26, 25); - snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.LDD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm, a.imm); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.LDD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm2, a.imm2); + return buff; + } + + // rv_xtheadmemidx, TH.LDIA + if ((opcode & 0xf800707f) == 0x7800400b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.LDIA", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); + return buff; + } + + // rv_xtheadmemidx, TH.LHIA + if ((opcode & 0xf800707f) == 0x3800400b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.LHIA", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); + return buff; + } + + // rv_xtheadmemidx, TH.LHUIA + if ((opcode & 0xf800707f) == 0xb800400b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.LHUIA", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); return buff; } @@ -258,8 +308,18 @@ const char* rv64_print(uint32_t opcode, uintptr_t addr) a.rd = FX(opcode, 11, 7); a.rs2 = FX(opcode, 24, 20); a.rs1 = FX(opcode, 19, 15); - a.imm = FX(opcode, 26, 25); - snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.LWD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm, a.imm); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.LWD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm2, a.imm2); + return buff; + } + + // rv_xtheadmemidx, TH.LWIA + if ((opcode & 0xf800707f) == 0x5800400b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.LWIA", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); return buff; } @@ -268,8 +328,18 @@ const char* rv64_print(uint32_t opcode, uintptr_t addr) a.rd = FX(opcode, 11, 7); a.rs2 = FX(opcode, 24, 20); a.rs1 = FX(opcode, 19, 15); - a.imm = FX(opcode, 26, 25); - snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.LWUD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm, a.imm); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.LWUD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm2, a.imm2); + return buff; + } + + // rv_xtheadmemidx, TH.LWUIA + if ((opcode & 0xf800707f) == 0xd800400b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.LWUIA", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); return buff; } @@ -307,13 +377,43 @@ const char* rv64_print(uint32_t opcode, uintptr_t addr) return buff; } + // rv_xtheadmemidx, TH.SBIB + if ((opcode & 0xf800707f) == 0x800500b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.SBIB", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); + return buff; + } + // rv_xtheadmempair, TH.SDD if ((opcode & 0xf800707f) == 0xf800500b) { a.rd = FX(opcode, 11, 7); a.rs2 = FX(opcode, 24, 20); a.rs1 = FX(opcode, 19, 15); - a.imm = FX(opcode, 26, 25); - snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.SDD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm, a.imm); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.SDD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm2, a.imm2); + return buff; + } + + // rv_xtheadmemidx, TH.SDIB + if ((opcode & 0xf800707f) == 0x6800500b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.SDIB", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); + return buff; + } + + // rv_xtheadmemidx, TH.SHIB + if ((opcode & 0xf800707f) == 0x2800500b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.SHIB", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); return buff; } @@ -340,8 +440,18 @@ const char* rv64_print(uint32_t opcode, uintptr_t addr) a.rd = FX(opcode, 11, 7); a.rs2 = FX(opcode, 24, 20); a.rs1 = FX(opcode, 19, 15); - a.imm = FX(opcode, 26, 25); - snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.SWD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm, a.imm); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, 0x%x(%d)", "TH.SWD", gpr[a.rd], gpr[a.rs2], gpr[a.rs1], a.imm2, a.imm2); + return buff; + } + + // rv_xtheadmemidx, TH.SWIB + if ((opcode & 0xf800707f) == 0x4800500b) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.imm = FX(opcode, 24, 20); + a.imm2 = FX(opcode, 26, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d), 0x%x(%d)", "TH.SWIB", gpr[a.rd], gpr[a.rs1], a.imm, a.imm, a.imm2, a.imm2); return buff; } @@ -391,7 +501,440 @@ const char* rv64_print(uint32_t opcode, uintptr_t addr) return buff; } - // TODO: add more... + // rv_v, VLUXEI16.V + if ((opcode & 0x1c00707f) == 0xC005007) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + a.vm = FX(opcode, 25, 25); + a.nf = FX(opcode, 31, 29); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, %s, %s", "VLUXEI16.V", vpr[a.vd], vpr[a.vs2], gpr[a.rs1], vm[a.vm], nf[a.nf]); + return buff; + } + + // rv_v, VLUXEI32.V + if ((opcode & 0x1c00707f) == 0xC006007) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + a.vm = FX(opcode, 25, 25); + a.nf = FX(opcode, 31, 29); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, %s, %s", "VLUXEI32.V", vpr[a.vd], vpr[a.vs2], gpr[a.rs1], vm[a.vm], nf[a.nf]); + return buff; + } + + // rv_v, VLUXEI64.V + if ((opcode & 0x1c00707f) == 0xC007007) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + a.vm = FX(opcode, 25, 25); + a.nf = FX(opcode, 31, 29); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, %s, %s", "VLUXEI64.V", vpr[a.vd], vpr[a.vs2], gpr[a.rs1], vm[a.vm], nf[a.nf]); + return buff; + } + + // rv_v, VLUXEI8.V + if ((opcode & 0x1c00707f) == 0xC000007) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + a.vm = FX(opcode, 25, 25); + a.nf = FX(opcode, 31, 29); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, %s, %s", "VLUXEI8.V", vpr[a.vd], vpr[a.vs2], gpr[a.rs1], vm[a.vm], nf[a.nf]); + return buff; + } + + // rv_v, VSUXEI16.V + if ((opcode & 0x1c00707f) == 0x1C005027) { + a.vs3 = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + a.vm = FX(opcode, 25, 25); + a.nf = FX(opcode, 31, 29); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, %s, %s", "VSUXEI16.V", vpr[a.vs3], vpr[a.vs2], gpr[a.rs1], vm[a.vm], nf[a.nf]); + return buff; + } + + // rv_v, VSUXEI32.V + if ((opcode & 0x1c00707f) == 0x1C006027) { + a.vs3 = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + a.vm = FX(opcode, 25, 25); + a.nf = FX(opcode, 31, 29); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, %s, %s", "VSUXEI32.V", vpr[a.vs3], vpr[a.vs2], gpr[a.rs1], vm[a.vm], nf[a.nf]); + return buff; + } + + // rv_v, VSUXEI64.V + if ((opcode & 0x1c00707f) == 0x1C007027) { + a.vs3 = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + a.vm = FX(opcode, 25, 25); + a.nf = FX(opcode, 31, 29); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, %s, %s", "VSUXEI64.V", vpr[a.vs3], vpr[a.vs2], gpr[a.rs1], vm[a.vm], nf[a.nf]); + return buff; + } + + // rv_v, VSUXEI8.V + if ((opcode & 0x1c00707f) == 0x1C000027) { + a.vs3 = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + a.vm = FX(opcode, 25, 25); + a.nf = FX(opcode, 31, 29); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s, %s, %s", "VSUXEI8.V", vpr[a.vs3], vpr[a.vs2], gpr[a.rs1], vm[a.vm], nf[a.nf]); + return buff; + } + + // rv_v, VFMV.S.F + if ((opcode & 0xfff0707f) == 0x36005057) { + a.vd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + snprintf(buff, sizeof(buff), "%-15s %s, %s", "VFMV.S.F", vpr[a.vd], fpr[a.rs1]); + return buff; + } + + // rv_v, VFMV.F.S + if ((opcode & 0xfe0ff07f) == 0x32001057) { + a.rd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + snprintf(buff, sizeof(buff), "%-15s %s, %s", "VFMV.F.S", fpr[a.rd], vpr[a.vs2]); + return buff; + } + + // rv_v, VFCVT.F.X.V + if ((opcode & 0xfc0ff07f) == 0x88019057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFCVT.F.X.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFCVT.F.XU.V + if ((opcode & 0xfc0ff07f) == 0x88011057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFCVT.F.XU.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFCVT.RTZ.X.F.V + if ((opcode & 0xfc0ff07f) == 0x88039057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFCVT.RTZ.X.F.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFCVT.RTZ.XU.F.V + if ((opcode & 0xfc0ff07f) == 0x88031057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFCVT.RTZ.XU.F.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFCVT.X.F.V + if ((opcode & 0xfc0ff07f) == 0x88009057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFCVT.X.F.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFCVT.XU.F.V + if ((opcode & 0xfc0ff07f) == 0x88001057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFCVT.XU.F.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFWCVT.F.F.V + if ((opcode & 0xfc0ff07f) == 0x88061057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFWCVT.F.F.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFWCVT.F.X.V + if ((opcode & 0xfc0ff07f) == 0x88059057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFWCVT.F.X.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFWCVT.F.XU.V + if ((opcode & 0xfc0ff07f) == 0x88051057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFWCVT.F.XU.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFWCVT.RTZ.X.F.V + if ((opcode & 0xfc0ff07f) == 0x88079057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFWCVT.RTZ.X.F.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFWCVT.RTZ.XU.F.V + if ((opcode & 0xfc0ff07f) == 0x88071057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFWCVT.RTZ.XU.F.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFWCVT.X.F.V + if ((opcode & 0xfc0ff07f) == 0x88049057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFWCVT.X.F.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFWCVT.XU.F.V + if ((opcode & 0xfc0ff07f) == 0x88041057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFWCVT.XU.F.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFNCVT.F.F.W + if ((opcode & 0xfc0ff07f) == 0x880a1057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFNCVT.F.F.W", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFNCVT.F.X.W + if ((opcode & 0xfc0ff07f) == 0x88099057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFNCVT.F.X.W", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFNCVT.F.XU.W + if ((opcode & 0xfc0ff07f) == 0x88091057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFNCVT.F.XU.W", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFNCVT.ROD.F.F.W + if ((opcode & 0xfc0ff07f) == 0x880a9057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFNCVT.ROD.F.F.W", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFNCVT.RTZ.X.F.W + if ((opcode & 0xfc0ff07f) == 0x880b9057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFNCVT.RTZ.X.F.W", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFNCVT.RTZ.XU.F.W + if ((opcode & 0xfc0ff07f) == 0x880b1057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFNCVT.RTZ.XU.F.W", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFNCVT.X.F.W + if ((opcode & 0xfc0ff07f) == 0x88089057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFNCVT.X.F.W", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFNCVT.XU.F.W + if ((opcode & 0xfc0ff07f) == 0x88081057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFNCVT.XU.F.W", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFSQRT.V + if ((opcode & 0xfc0ff07f) == 0x8c001057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFSQRT.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFCLASS.V + if ((opcode & 0xfc0ff07f) == 0x8c081057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFCLASS.V", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VADC.VIM + if ((opcode & 0xfe00707f) == 0x42003057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.imm = FX(opcode, 19, 15); + snprintf(buff, sizeof(buff), "%-15s %s, %s, 0x%x(%d)", "VADC.VIM", vpr[a.vd], vpr[a.vs2], SIGN_EXTEND(a.imm, 5), SIGN_EXTEND(a.imm, 5)); + return buff; + } + + // rv_v, VADC.VVM + if ((opcode & 0xfe00707f) == 0x42000057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vs1 = FX(opcode, 19, 15); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VADC.VVM", vpr[a.vd], vpr[a.vs2], vpr[a.vs1]); + return buff; + } + + // rv_v, VADC.VXM + if ((opcode & 0xfe00707f) == 0x42004057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VADC.VXM", vpr[a.vd], vpr[a.vs2], gpr[a.rs1]); + return buff; + } + + // rv_v, VSBC.VVM + if ((opcode & 0xfe00707f) == 0x4A000057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vs1 = FX(opcode, 19, 15); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VSBC.VVM", vpr[a.vd], vpr[a.vs2], vpr[a.vs1]); + return buff; + } + + // rv_v, VSBC.VXM + if ((opcode & 0xfe00707f) == 0x4A004057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.rs1 = FX(opcode, 19, 15); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VSBC.VXM", vpr[a.vd], vpr[a.vs2], gpr[a.rs1]); + return buff; + } + + // rv_v, VMV.X.S + if ((opcode & 0xfe0ff07f) == 0x32002057) { + a.rd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + snprintf(buff, sizeof(buff), "%-15s %s, %s", "VMV.X.S", gpr[a.rd], vpr[a.vs2]); + return buff; + } + + // rv_v, VMV.S.X + if ((opcode & 0xfff0707f) == 0x36006057) { + a.vd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + snprintf(buff, sizeof(buff), "%-15s %s, %s", "VMV.S.X", vpr[a.vd], gpr[a.rs1]); + return buff; + } + + // rv_v, VMSBF.M + if ((opcode & 0xfc0ff07f) == 0x5800a057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VMSBF.M", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VMSOF.M + if ((opcode & 0xfc0ff07f) == 0x58012057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VMSOF.M", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VMSIF.M + if ((opcode & 0xfc0ff07f) == 0x5801a057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VMSIF.M", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VIOTA.M + if ((opcode & 0xfc0ff07f) == 0x58082057) { + a.vd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VIOTA.M", vpr[a.vd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VCPOP.M + if ((opcode & 0xfc0ff07f) == 0x58082057) { + a.rd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VCPOP.M", gpr[a.rd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VFIRST.M + if ((opcode & 0xfc0ff07f) == 0x5808a057) { + a.rd = FX(opcode, 11, 7); + a.vs2 = FX(opcode, 24, 20); + a.vm = FX(opcode, 25, 25); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VFIRST.M", fpr[a.rd], vpr[a.vs2], vm[a.vm]); + return buff; + } + + // rv_v, VEXT.X.V + if ((opcode & 0xfe00707f) == 0x32002057) { + a.rd = FX(opcode, 11, 7); + a.rs1 = FX(opcode, 19, 15); + a.vs2 = FX(opcode, 24, 20); + snprintf(buff, sizeof(buff), "%-15s %s, %s, %s", "VEXT.X.V", vpr[a.rd], vpr[a.vs2], gpr[a.rs1]); + return buff; + } } /**************** |