From: Luke Kenneth Casson Leighton Date: Wed, 19 Apr 2023 10:18:51 +0000 (+0100) Subject: off-by-one in extsb XLEN=64 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a8624f92361cadca8de1373e0be4caebdffe6e5;p=libreriscv.git off-by-one in extsb XLEN=64 --- diff --git a/openpower/sv/rfc/ls005.mdwn b/openpower/sv/rfc/ls005.mdwn index 648ef5750..deac1ceac 100644 --- a/openpower/sv/rfc/ls005.mdwn +++ b/openpower/sv/rfc/ls005.mdwn @@ -297,7 +297,7 @@ The RTL for `extsb` becomes: if XLEN = 8 then RT <- in[7] * 8 # 1->8 if XLEN = 16 then RT <- in[6] * 15 || in[7] # 2->16 if XLEN = 32 then RT <- in[4] * 29 || in[5:7] # 4->32 - if XLEN = 64 then RT <- in[0] * 56 || in[1:7] # 8->64 + if XLEN = 64 then RT <- in[0] * 57 || in[1:7] # 8->64 ``` And `extsh` and `extsw` follow similar logic. Interestingly there is