From 8f4ea0ae53d4a00d3a3f2c4e6a4b7a487f6f111c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 28 Oct 2022 23:09:22 +0100 Subject: [PATCH] dsld: MASK(0, 63-n) works just as well as MASK(64, 63-n). also fix "overflow" pseudocode --- openpower/isa/svfixedarith.mdwn | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/openpower/isa/svfixedarith.mdwn b/openpower/isa/svfixedarith.mdwn index 6d82b896..4c624a3a 100644 --- a/openpower/isa/svfixedarith.mdwn +++ b/openpower/isa/svfixedarith.mdwn @@ -57,12 +57,12 @@ Pseudo-code: n <- (RB)[58:63] v <- ROTL64((RA), n) - mask <- MASK(64, 63-n) + mask <- MASK(0, 63-n) RT <- (v[0:63] & mask) | ((RC) & ¬mask) RS <- v[0:63] & ¬mask - overflow = 0 - if RS != [0]*64: - overflow = 1 + overflow <- 0 + if RS != [0]*64 then + overflow <- 1 Special Registers Altered: @@ -82,9 +82,9 @@ Pseudo-code: mask <- MASK(n, 63) RT <- (v[0:63] & mask) | ((RC) & ¬mask) RS <- v[0:63] & ¬mask - overflow = 0 - if RS != [0]*64: - overflow = 1 + overflow <- 0 + if RS != [0]*64 then + overflow <- 1 Special Registers Altered: -- 2.30.2