qemu-trivial
[Top][All Lists]
Advanced

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

Re: Inconsistency - potential bug


From: Mansour Ahmadi
Subject: Re: Inconsistency - potential bug
Date: Fri, 6 Mar 2020 13:47:13 -0500

Got it, thanks! 


On Fri, Mar 6, 2020 at 6:11 AM Laurent Vivier <address@hidden> wrote:
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]