Loading src/main/java/hk/quantr/assembler/RISCVDisassembler.java +19 −18 Changes for src/main/java/hk/quantr/assembler/RISCVDisassembler.java: 19 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -671,12 +671,30 @@ public class RISCVDisassembler { public static InstructionType getTypeFRInstruction(int funct3, int funct7, int frs1, int frs2) throws WrongInstructionException { if (funct7 == 0) { return InstructionType.fadd_s; } else if (funct7 == 1) { return InstructionType.fadd_d; } else if (funct7 == 3) { return InstructionType.fadd_q; } else if (funct7 == 4) { return InstructionType.fsub_s; } else if (funct7 == 5) { return InstructionType.fsub_d; } else if (funct7 == 6) { return InstructionType.fmul_q; } else if (funct7 == 7) { return InstructionType.fsub_q; } else if (funct7 == 8) { return InstructionType.fmul_s; } else if (funct7 == 10) { } else if (funct7 == 9) { return InstructionType.fmul_d; } else if (funct7 == 11) { return InstructionType.fmul_q; } else if (funct7 == 12) { return InstructionType.fdiv_s; } else if (funct7 == 13) { return InstructionType.fdiv_d; } else if (funct7 == 15) { return InstructionType.fdiv_q; } else if (funct7 == 0b0101100 && frs2 == 0) { return InstructionType.fsqrt_s; } else if (funct7 == 0b0010000 && funct3 == 0) { Loading Loading @@ -723,14 +741,6 @@ public class RISCVDisassembler { return InstructionType.fcvt_s_l; } else if (funct7 == 0b1101000 && frs2 == 3) { return InstructionType.fcvt_s_lu; } else if (funct7 == 1) { return InstructionType.fadd_d; } else if (funct7 == 5) { return InstructionType.fsub_d; } else if (funct7 == 9) { return InstructionType.fmul_d; } else if (funct7 == 13) { return InstructionType.fdiv_d; } else if (funct7 == 0b0101101 && frs2 == 0) { return InstructionType.fsqrt_d; } else if (funct7 == 0b0010001 && funct3 == 0) { Loading Loading @@ -781,15 +791,6 @@ public class RISCVDisassembler { return InstructionType.fcvt_d_l; } else if (funct7 == 0b1101001 && frs2 == 3) { return InstructionType.fcvt_d_lu; } //32Q start here else if (funct7 == 3) { return InstructionType.fadd_q; } else if (funct7 == 7) { return InstructionType.fsub_q; } else if (funct7 == 11) { return InstructionType.fmul_q; } else if (funct7 == 15) { return InstructionType.fdiv_q; } else if (funct7 == 0b0101111 && frs2 == 0) { return InstructionType.fsqrt_q; } else if (funct7 == 0b0010011 && funct3 == 0) { Loading Loading
src/main/java/hk/quantr/assembler/RISCVDisassembler.java +19 −18 Changes for src/main/java/hk/quantr/assembler/RISCVDisassembler.java: 19 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -671,12 +671,30 @@ public class RISCVDisassembler { public static InstructionType getTypeFRInstruction(int funct3, int funct7, int frs1, int frs2) throws WrongInstructionException { if (funct7 == 0) { return InstructionType.fadd_s; } else if (funct7 == 1) { return InstructionType.fadd_d; } else if (funct7 == 3) { return InstructionType.fadd_q; } else if (funct7 == 4) { return InstructionType.fsub_s; } else if (funct7 == 5) { return InstructionType.fsub_d; } else if (funct7 == 6) { return InstructionType.fmul_q; } else if (funct7 == 7) { return InstructionType.fsub_q; } else if (funct7 == 8) { return InstructionType.fmul_s; } else if (funct7 == 10) { } else if (funct7 == 9) { return InstructionType.fmul_d; } else if (funct7 == 11) { return InstructionType.fmul_q; } else if (funct7 == 12) { return InstructionType.fdiv_s; } else if (funct7 == 13) { return InstructionType.fdiv_d; } else if (funct7 == 15) { return InstructionType.fdiv_q; } else if (funct7 == 0b0101100 && frs2 == 0) { return InstructionType.fsqrt_s; } else if (funct7 == 0b0010000 && funct3 == 0) { Loading Loading @@ -723,14 +741,6 @@ public class RISCVDisassembler { return InstructionType.fcvt_s_l; } else if (funct7 == 0b1101000 && frs2 == 3) { return InstructionType.fcvt_s_lu; } else if (funct7 == 1) { return InstructionType.fadd_d; } else if (funct7 == 5) { return InstructionType.fsub_d; } else if (funct7 == 9) { return InstructionType.fmul_d; } else if (funct7 == 13) { return InstructionType.fdiv_d; } else if (funct7 == 0b0101101 && frs2 == 0) { return InstructionType.fsqrt_d; } else if (funct7 == 0b0010001 && funct3 == 0) { Loading Loading @@ -781,15 +791,6 @@ public class RISCVDisassembler { return InstructionType.fcvt_d_l; } else if (funct7 == 0b1101001 && frs2 == 3) { return InstructionType.fcvt_d_lu; } //32Q start here else if (funct7 == 3) { return InstructionType.fadd_q; } else if (funct7 == 7) { return InstructionType.fsub_q; } else if (funct7 == 11) { return InstructionType.fmul_q; } else if (funct7 == 15) { return InstructionType.fdiv_q; } else if (funct7 == 0b0101111 && frs2 == 0) { return InstructionType.fsqrt_q; } else if (funct7 == 0b0010011 && funct3 == 0) { Loading