qemu-commits
[Top][All Lists]
Advanced

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

Re: [Qemu-commits] [COMMIT 5d02482] linux-user: fix old style decrement


From: Laurent Desnogues
Subject: Re: [Qemu-commits] [COMMIT 5d02482] linux-user: fix old style decrement usage
Date: Wed, 30 Sep 2009 23:57:01 +0200

On Wed, Sep 30, 2009 at 9:01 PM, Anthony Liguori <address@hidden> wrote:
> From: Michael S. Tsirkin <address@hidden>
>
> Modern compilers do not parse "=-" as decrement:
> you must use "-=" for that.
>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> Signed-off-by: Blue Swirl <address@hidden>
>
> 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




reply via email to

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