From: Luke Kenneth Casson Leighton Date: Mon, 5 Feb 2024 21:12:04 +0000 (+0000) Subject: bug 1034: add crbinlog unit test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c2419c7f3;p=openpower-isa.git bug 1034: add crbinlog unit test --- diff --git a/src/openpower/test/bitmanip/bitmanip_cases.py b/src/openpower/test/bitmanip/bitmanip_cases.py index 2e79931f..93476025 100644 --- a/src/openpower/test/bitmanip/bitmanip_cases.py +++ b/src/openpower/test/bitmanip/bitmanip_cases.py @@ -18,6 +18,20 @@ def bmatflip(ra): return result +def crbinlog(bt, ba, bfb): + lut = bfb + expected = 0 + checks = (ba, bt) # LUT positions 1<<0=ba 1<<1=bt + lut_index = 0 + for j, check in enumerate(checks): + if check & 1: + lut_index |= 1<