From 1fc2fcaf0b86ea9913559889025f9547d9180f3d Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Wed, 27 Sep 2023 16:22:03 +0800 Subject: [PATCH 1/2] mempair: fix mem index typos in lwd and swd --- xtheadmempair/lwd.adoc | 2 +- xtheadmempair/swd.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xtheadmempair/lwd.adoc b/xtheadmempair/lwd.adoc index 1281878..2a6ae7c 100644 --- a/xtheadmempair/lwd.adoc +++ b/xtheadmempair/lwd.adoc @@ -38,7 +38,7 @@ Operation:: if (rs1 != rd1 && rs != rd2 && rd1 != rd2) { addr := rs1 + (zero_extend(imm2) << 3) tmp1 := sign_extend(mem[addr+3:addr]) - tmp2 := sign_extend(mem[addr+7:addr+3]) + tmp2 := sign_extend(mem[addr+7:addr+4]) (reg[rd1], reg[rd2]) := (tmp1, tmp2) } -- diff --git a/xtheadmempair/swd.adoc b/xtheadmempair/swd.adoc index 4069b92..c6afb55 100644 --- a/xtheadmempair/swd.adoc +++ b/xtheadmempair/swd.adoc @@ -35,7 +35,7 @@ Operation:: -- addr := rs1 + (zero_extend(imm2) << 3) mem[addr+3:addr] := reg[rd1][31:0] -mem[addr+7:addr+3] := reg[rd2][31:0] +mem[addr+7:addr+4] := reg[rd2][31:0] -- Permission:: From 65b909db108f1017f04d17597d55da458504e5a8 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Wed, 27 Sep 2023 22:52:05 +0800 Subject: [PATCH 2/2] fix mem index typo in lwud --- xtheadmempair/lwud.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xtheadmempair/lwud.adoc b/xtheadmempair/lwud.adoc index 858ebcb..9cf1575 100644 --- a/xtheadmempair/lwud.adoc +++ b/xtheadmempair/lwud.adoc @@ -38,7 +38,7 @@ Operation:: if (rs1 != rd1 && rs != rd2 && rd1 != rd2) { addr := rs1 + (zero_extend(imm2) << 3) tmp1 := zero_extend(mem[addr+3:addr]) - tmp2 := zero_extend(mem[addr+7:addr+3]) + tmp2 := zero_extend(mem[addr+7:addr+4]) (reg[rd1], reg[rd2]) := (tmp1, tmp2) } --