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
This commit is contained in:
Richard Henderson 2019-06-13 16:17:54 -04:00 committed by Lioncash
parent afaea6a291
commit 7c03c8eb04
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -318,7 +318,7 @@ class Field:
return '{0}(insn, {1}, {2})'.format(extr, self.pos, self.len) return '{0}(insn, {1}, {2})'.format(extr, self.pos, self.len)
def __eq__(self, other): 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): def __ne__(self, other):
return not self.__eq__(other) return not self.__eq__(other)