From: Luke Kenneth Casson Leighton Date: Fri, 23 Apr 2021 16:43:42 +0000 (+0100) Subject: use MASK32 function in fixedshift X-Git-Tag: 0.0.1~19 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5367023b60e7ec1383e3c06fbca7b062f2c27ad;p=openpower-isa.git use MASK32 function in fixedshift --- 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