From f5367023b60e7ec1383e3c06fbca7b062f2c27ad Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 23 Apr 2021 17:43:42 +0100 Subject: [PATCH] use MASK32 function in fixedshift --- openpower/isa/fixedshift.mdwn | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/openpower/isa/fixedshift.mdwn b/openpower/isa/fixedshift.mdwn index 58d3ea70..514c3b4e 100644 --- a/openpower/isa/fixedshift.mdwn +++ b/openpower/isa/fixedshift.mdwn @@ -21,7 +21,7 @@ Pseudo-code: n <- SH r <- ROTL32((RS)[32:63], n) - m <- MASK(MB+32, ME+32) + m <- MASK32(MB, ME) RA <- r & m Special Registers Altered: @@ -39,7 +39,7 @@ Pseudo-code: n <- (RB)[59:63] r <- ROTL32((RS)[32:63], n) - m <- MASK(MB+32, ME+32) + m <- MASK32(MB, ME) RA <- r & m Special Registers Altered: @@ -57,7 +57,7 @@ Pseudo-code: n <- SH r <- ROTL32((RS)[32:63], n) - m <- MASK(MB+32, ME+32) + m <- MASK32(MB, ME) RA <- r&m | (RA) & ¬m Special Registers Altered: @@ -193,7 +193,7 @@ Pseudo-code: n <- (RB)[59:63] r <- ROTL32((RS)[32:63], n) if (RB)[58] = 0 then - m <- MASK(32, 63-n) + m <- MASK32(0, 31-n) else m <- [0]*64 RA <- r & m @@ -213,7 +213,7 @@ Pseudo-code: n <- (RB)[59:63] r <- ROTL32((RS)[32:63], 64-n) if (RB)[58] = 0 then - m <- MASK(n+32, 63) + m <- MASK32(n, 31) else m <- [0]*64 RA <- r & m @@ -232,7 +232,7 @@ Pseudo-code: n <- SH r <- ROTL32((RS)[32:63], 64-n) - m <- MASK(n+32, 63) + m <- MASK32(n, 31) s <- (RS)[32] RA <- r&m | ([s]*64)& ¬m carry <- s & ((r&¬m)[32:63] != 0) @@ -256,7 +256,7 @@ Pseudo-code: n <- (RB)[59:63] r <- ROTL32((RS)[32:63], 64-n) if (RB)[58] = 0 then - m <- MASK(n+32, 63) + m <- MASK32(n, 31) else m <- [0]*64 s <- (RS)[32] RA <- r&m | ([s]*64)& ¬m -- 2.30.2