From d6f82184c9a0c7cc51fdc2ea24b8f4bf0bc2a94b Mon Sep 17 00:00:00 2001 From: lkcl Date: Wed, 22 Jun 2022 18:02:21 +0100 Subject: [PATCH] --- openpower/sv/vector_ops/discussion.mdwn | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/openpower/sv/vector_ops/discussion.mdwn b/openpower/sv/vector_ops/discussion.mdwn index 3b6c6fd74..2241840c2 100644 --- a/openpower/sv/vector_ops/discussion.mdwn +++ b/openpower/sv/vector_ops/discussion.mdwn @@ -8,11 +8,10 @@ needs some work though ``` def bmask(mode, RA, RB=None, zero=False): - mask = [1] * XLEN - mask = RB if RB is not None else 0xffffffffffffffff - ra <- RA & mask - if mode[0] then a1 <- ra else a1 <-~ra - mode2 = (mode >> 1) & 0b11 + if _RB = 0 then mask <- [1] * XLEN else mask = (RB) + a1 <- (RA) & mask + if mode[1] then a1 <- ~ra + mode2 <- mode[2:3] if mode2 = 0 then a2 <- -ra if mode2 = 1 then a2 <- ra-1 if mode2 = 2 then a2 <- ra+1 @@ -22,8 +21,8 @@ def bmask(mode, RA, RB=None, zero=False): mode3 <- mode[3:4] if mode3 = 0 then result <- a1 | a2 if mode3 = 1 then result <- a1 & a2 - if mode3 = 2 result <- a1 ^ a2 - if mode3 = 3 result <- UNDEFINED + if mode3 = 2 then result <- a1 ^ a2 + if mode3 = 3 then result <- UNDEFINED result <- result & mask if L = 1 then result <- result | (RA & ~mask) -- 2.30.2