From d848a7271ab7984a3a7ea8b7c1ffc918b64a507c Mon Sep 17 00:00:00 2001 From: lkcl Date: Mon, 17 Apr 2023 14:45:51 +0100 Subject: [PATCH] --- openpower/sv/rfc/ls005.mdwn | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/openpower/sv/rfc/ls005.mdwn b/openpower/sv/rfc/ls005.mdwn index 1f064d2e9..1ef796de7 100644 --- a/openpower/sv/rfc/ls005.mdwn +++ b/openpower/sv/rfc/ls005.mdwn @@ -140,7 +140,7 @@ the full width". # Examples -add pseudocode examples demonstrating modification. +## pseudocode examples demonstrating modification. before for popcntb: @@ -164,6 +164,19 @@ do i = 0 to ((XLEN/8)-1) RA[(i*8):(i*8)+7] <- n ``` +## no modification needed, but function changes + +For the `addi` instruction there is no apparent change: + +``` +RT <- (RA|0) + EXTS(SI) +``` + +However behind the scenes, RA is XLEN bits wide, therefore EXTS performs an +increase in bitlength not to exactly 64 but to XLEN. Obviousy for XLEN=16 +there is no sign-extension, and for XLEN=8 truncation of `SI` will occur. + + \newpage{} -- 2.30.2