From 27824f4ec3f35578d249ba7e100edd6669724ad1 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Mon, 27 Dec 2021 01:17:13 +0000 Subject: [PATCH] Add missing parentheses for explicit operator precedence --- src/openpower/decoder/test/_pyrtl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openpower/decoder/test/_pyrtl.py b/src/openpower/decoder/test/_pyrtl.py index 366c7367..37f6936d 100644 --- a/src/openpower/decoder/test/_pyrtl.py +++ b/src/openpower/decoder/test/_pyrtl.py @@ -291,8 +291,8 @@ class _LHSValueCompiler(_ValueCompiler): def on_Slice(self, value): def gen(arg): width_mask = (1 << (value.stop - value.start)) - 1 - self(value.value)(f"({self.lrhs(value.value)} & " \ - f"{~(width_mask << value.start)} | " \ + self(value.value)(f"(({self.lrhs(value.value)} & " \ + f"{~(width_mask << value.start)}) | " \ f"(({width_mask} & {arg}) << {value.start}))") return gen -- 2.30.2