From 7c03c8eb04841b04d3165a1692cd7a063db1f482 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 13 Jun 2019 16:17:54 -0400 Subject: [PATCH] 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). Backports commit 2c7d442743854d2c1f5475446e088bd523f4bb20 from qemu --- qemu/scripts/decodetree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/scripts/decodetree.py b/qemu/scripts/decodetree.py index ab60f4d8..321487d4 100644 --- a/qemu/scripts/decodetree.py +++ b/qemu/scripts/decodetree.py @@ -318,7 +318,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)