[prev in list] [next in list] [prev in thread] [next in thread]
List: qemu-commits
Subject: Re: [Qemu-commits] [COMMIT 5d02482] linux-user: fix old style decrement usage
From: Laurent Desnogues <laurent.desnogues () gmail ! com>
Date: 2009-09-30 21:57:01
Message-ID: 761ea48b0909301457x3d587332wb0cb5ec8d3799998 () mail ! gmail ! com
[Download RAW message or body]
On Wed, Sep 30, 2009 at 9:01 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
> From: Michael S. Tsirkin <mst@redhat.com>
>
> Modern compilers do not parse "=-" as decrement:
> you must use "-=" for that.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>
> diff --git a/linux-user/arm/nwfpe/fpa11.c b/linux-user/arm/nwfpe/fpa11.c
> index 3ff80eb..c4461e0 100644
> --- a/linux-user/arm/nwfpe/fpa11.c
> +++ b/linux-user/arm/nwfpe/fpa11.c
> @@ -191,7 +191,7 @@ unsigned int EmulateAll(unsigned int opcode, FPA11* qfpa, CPUARMState* qregs)
> if(nRc == 1 && get_float_exception_flags(&fpa11->fp_status))
> {
> //printf("fef 0x%x\n",float_exception_flags);
> - nRc=-get_float_exception_flags(&fpa11->fp_status);
> + nRc -= get_float_exception_flags(&fpa11->fp_status);
Are you sure this is correct?
Current gcc will do with the previous version:
nRc = (-get_float_exception_flags(&fpa11->fp_status));
While with the new one it will be:
nRc = (nRc - get_float_exception_flags(&fpa11->fp_status));
And nRc isn't zero here. So the semantics has changed.
Laurent
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic