From 9b345efc413dc85f4e5c070f41332f0c16dd481b Mon Sep 17 00:00:00 2001 From: tracer-ics2023 Date: Thu, 12 Sep 2024 11:25:16 +0800 Subject: [PATCH] =?UTF-8?q?>=20=20compile=20NEMU=20221220000=20=E5=BC=A0?= =?UTF-8?q?=E4=B8=89=20Linux=20zzy=205.15.146.1-microsoft-standard-WSL2=20?= =?UTF-8?q?#1=20SMP=20Thu=20Jan=2011=2004:09:03=20UTC=202024=20x86=5F64=20?= =?UTF-8?q?x86=5F64=20x86=5F64=20GNU/Linux=20=2011:25:16=20up=20=201:39,?= =?UTF-8?q?=20=201=20user,=20=20load=20average:=200.08,=200.26,=200.36?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nemu/src/isa/riscv32/inst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nemu/src/isa/riscv32/inst.c b/nemu/src/isa/riscv32/inst.c index 99697ed..b51ac55 100644 --- a/nemu/src/isa/riscv32/inst.c +++ b/nemu/src/isa/riscv32/inst.c @@ -120,7 +120,7 @@ static int decode_exec(Decode *s) { INSTPAT("0000000 00001 00000 000 00000 11100 11", ebreak , N, NEMUTRAP(s->pc, R(10))); // R(10) is $a0 INSTPAT("0000001 ????? ????? 000 ????? 01100 11", mul , R, R(rd) = (sword_t)src1 * (sword_t)src2); - INSTPAT("0000001 ????? ????? 001 ????? 01100 11", mulh , R, R(rd) = ((int64_t)(sword_t) src1 * (int64_t)(word_t) src2) >> 32); + INSTPAT("0000001 ????? ????? 001 ????? 01100 11", mulh , R, R(rd) = ((int64_t)(sword_t) src1 * (int64_t)(sword_t) src2) >> 32); INSTPAT("0000001 ????? ????? 010 ????? 01100 11", mulhsu , R, R(rd) = ((int64_t)(sword_t) src1 * (uint64_t)src2) >> 32); // never used INSTPAT("0000001 ????? ????? 011 ????? 01100 11", mulhu , R, R(rd) = ((uint64_t)src1 * (uint64_t)src2) >> 32); // never used INSTPAT("0000001 ????? ????? 100 ????? 01100 11", div , R, R(rd) = (src1 == INT_MIN && src2 == -1) ? src1 : (src2 ? (sword_t) src1 / (sword_t) src2 : -1));