From: Mikolaj Wielgus Date: Mon, 27 Dec 2021 01:25:04 +0000 (+0000) Subject: bool() is !!() for integers X-Git-Tag: sv_maxu_works-initial~595 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60be31ab7f50cf073a6bb3e1e995d56baea250c9;p=openpower-isa.git bool() is !!() for integers --- diff --git a/src/openpower/decoder/test/_pyrtl.py b/src/openpower/decoder/test/_pyrtl.py index 37f6936d..8530020c 100644 --- a/src/openpower/decoder/test/_pyrtl.py +++ b/src/openpower/decoder/test/_pyrtl.py @@ -145,7 +145,7 @@ class _RHSValueCompiler(_ValueCompiler): if value.operator == "-": return f"(-{sign(arg)})" if value.operator == "b": - return f"bool({mask(arg)})" + return f"!!({mask(arg)})" if value.operator == "r|": return f"(0 != {mask(arg)})" if value.operator == "r&":