summaryrefslogtreecommitdiffstats
path: root/Tools/cases_generator/stacking.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/cases_generator/stacking.py')
-rw-r--r--Tools/cases_generator/stacking.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/cases_generator/stacking.py b/Tools/cases_generator/stacking.py
index d457ce0..9bb7f46 100644
--- a/Tools/cases_generator/stacking.py
+++ b/Tools/cases_generator/stacking.py
@@ -61,14 +61,14 @@ class StackOffset:
for eff in self.deep:
if eff.size:
terms.append(("-", maybe_parenthesize(eff.size)))
- elif eff.cond and eff.cond != "1":
+ elif eff.cond and eff.cond not in ("0", "1"):
terms.append(("-", f"({parenthesize_cond(eff.cond)} ? 1 : 0)"))
elif eff.cond != "0":
num -= 1
for eff in self.high:
if eff.size:
terms.append(("+", maybe_parenthesize(eff.size)))
- elif eff.cond and eff.cond != "1":
+ elif eff.cond and eff.cond not in ("0", "1"):
terms.append(("+", f"({parenthesize_cond(eff.cond)} ? 1 : 0)"))
elif eff.cond != "0":
num += 1