qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inconsistency - potential bug


From: Laurent Vivier
Subject: Re: Inconsistency - potential bug
Date: Fri, 6 Mar 2020 12:11:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

Le 05/03/2020 à 22:22, Mansour Ahmadi a écrit :
> Hi
> 
> It seems there is an inconsistency here:
> 
> https://github.com/qemu/qemu/blob/55afdac3b29e672aad51e953412364127e54268b/disas/ppc.c#L996
> if(((insn & (1<< 21)) == 0) != ((insn & (1<< 15)) == 0))
> *invalid = 1;
> https://github.com/qemu/qemu/blob/55afdac3b29e672aad51e953412364127e54268b/disas/ppc.c#L1041
> if(((insn & (1<< 21)) == 0) == ((insn & (1<< 15)) == 0))
> *invalid = 1;
> 
> Does "==" need to be changed to "!="?
> 
> Mansour
> 

This comes from binutils 2.17:

 eca8f8889ff5 ("Update ppc-dis.c from binutils 2.17")

Latest binutils has kept the same lines.

 
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=opcodes/ppc-opc.c#l25

extract_bdm

 250       if (((insn & (1 << 21)) == 0) != ((insn & (1 << 15)) == 0))

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=opcodes/ppc-opc.c#l289

extract_bdp

 295       if (((insn & (1 << 21)) == 0) == ((insn & (1 << 15)) == 0))

So if there is a bug, it has to be reported to binutils.

Thanks,
Laurent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]