From: Mikolaj Wielgus Date: Mon, 27 Dec 2021 01:17:13 +0000 (+0000) Subject: Add missing parentheses for explicit operator precedence X-Git-Tag: sv_maxu_works-initial~596 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=27824f4ec3f35578d249ba7e100edd6669724ad1;p=openpower-isa.git Add missing parentheses for explicit operator precedence --- 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