From c7e7ea66564c9c2ba1a1b1f931b6d37f0269b72a Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 25 Jun 2022 13:06:02 +0100 Subject: [PATCH] match mode to av.mdwn (bm) in bmask.py --- openpower/sv/bmask.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openpower/sv/bmask.py b/openpower/sv/bmask.py index 29b8c9ad3..e30f8a29e 100644 --- a/openpower/sv/bmask.py +++ b/openpower/sv/bmask.py @@ -1,15 +1,15 @@ -def bmask(mode, RA, RB=None, zero=False): +def bmask(bm, RA, RB=None, zero=False): mask = RB if RB is not None else 0xffffffffffffffff ra = RA & mask - a1 = ra if mode&1 else ~ra - mode2 = (mode >> 1) & 0b11 + a1 = ra if bm&1 else ~ra + mode2 = (bm >> 1) & 0b11 if mode2 == 0: a2 = -ra if mode2 == 1: a2 = ra-1 if mode2 == 2: a2 = ra+1 if mode2 == 3: a2 = ~(ra+1) a1 = a1 & mask a2 = a2 & mask - mode3 = (mode >> 3) & 0b11 + mode3 = (bm >> 3) & 0b11 if mode3 == 0: RT = a1 | a2 if mode3 == 1: RT = a1 & a2 if mode3 == 2: RT = a1 ^ a2 -- 2.30.2