aboutsummaryrefslogtreecommitdiff
path: root/scripts/decodetree.py
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-06-11 16:39:41 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-06-13 15:14:03 +0100
commit2c7d442743854d2c1f5475446e088bd523f4bb20 (patch)
tree850beea619d48e9a2c1773e1c1a476a4233074ec /scripts/decodetree.py
parentd67ebada159148bfdfde84871338738e4465e985 (diff)
decodetree: Fix comparison of Field
Typo comparing the sign of the field, twice, instead of also comparing the mask of the field (which itself encodes both position and length). Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20190604154225.26992-1-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/decodetree.py')
-rwxr-xr-xscripts/decodetree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 81874e22cc..d7a59d63ac 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -184,7 +184,7 @@ class Field:
return '{0}(insn, {1}, {2})'.format(extr, self.pos, self.len)
def __eq__(self, other):
- return self.sign == other.sign and self.sign == other.sign
+ return self.sign == other.sign and self.mask == other.mask
def __ne__(self, other):
return not self.__eq__(other)