[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] decodetree: Fix comparison of Field
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH] decodetree: Fix comparison of Field |
Date: |
Tue, 11 Jun 2019 13:38:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 6/4/19 5:42 PM, Richard Henderson wrote:
> 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 <address@hidden>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> scripts/decodetree.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
Argh
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
>
> def __ne__(self, other):
> return not self.__eq__(other)
>