From 8e49d0ecb3a0b38672e4cabaf6a7ef1fb5b3225b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 20 Jun 2022 16:58:21 +0100 Subject: [PATCH] cleanup sof and sif --- openpower/sv/sif.py | 2 +- openpower/sv/sof.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/openpower/sv/sif.py b/openpower/sv/sif.py index adaf0b17d..46f6b4504 100644 --- a/openpower/sv/sif.py +++ b/openpower/sv/sif.py @@ -10,9 +10,9 @@ def sif(RA, mask=None, zero=False): if setting_mode and mask is not None and not (mask & bit): setting_mode = False # masked out, stop setting if setting_mode: + RT |= bit # inclusively set bit in RT if RA & bit: # found a bit in rs1: stop setting RT setting_mode = False - RT |= bit i += 1 return RT diff --git a/openpower/sv/sof.py b/openpower/sv/sof.py index 164c32623..66f4b86af 100644 --- a/openpower/sv/sof.py +++ b/openpower/sv/sof.py @@ -8,14 +8,13 @@ def sof(RA, mask=None, zero=False): bit = 1<