From 1a8624f92361cadca8de1373e0be4caebdffe6e5 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 19 Apr 2023 11:18:51 +0100 Subject: [PATCH] off-by-one in extsb XLEN=64 --- openpower/sv/rfc/ls005.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2