From 60be31ab7f50cf073a6bb3e1e995d56baea250c9 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Mon, 27 Dec 2021 01:25:04 +0000 Subject: [PATCH] bool() is !!() for integers --- src/openpower/decoder/test/_pyrtl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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&": -- 2.30.2