Skip to content

Commit

Permalink
Merge pull request #29 from ksco/fixmempair
Browse files Browse the repository at this point in the history
mempair: fix mem index typos in lwd and swd
  • Loading branch information
Cooper-Qu authored Sep 27, 2023
2 parents d75244d + 65b909d commit 7d92607
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xtheadmempair/lwd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
--
Expand Down
2 changes: 1 addition & 1 deletion xtheadmempair/lwud.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
--
Expand Down
2 changes: 1 addition & 1 deletion xtheadmempair/swd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down

0 comments on commit 7d92607

Please sign in to comment.