qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] qemu hw/mips_r4k.c target-mips/cpu.h target-mip...


From: André Braga
Subject: Re: [Qemu-devel] qemu hw/mips_r4k.c target-mips/cpu.h target-mip...
Date: Thu, 21 Dec 2006 12:46:43 -0200

On 12/21/06, Thiemo Seufer <address@hidden> wrote:
Fabrice Bellard wrote:
> You should suppress the SIGN_EXTEND32() macro and just use an 'int32_t'
> cast...

Then it may not work. A MIPS64 CPU requires properly sign-extended
32bit values. Host architectures can define either sign- or zero-
Extension for 32bit values in 64bit Registers.

Whether or not it works, GCC *WILL* optimize it away as a redundant
statement, if it deems so (i.e., if it's called with some flag that
enables cse/gcse and peephole optimizations, and the variable(s) in
question is(are) not declared volatile).

IMHO macros like these SHOULD stay, as they are mostly innocuous and
happen to document the target machine behaviour.



Cheers,
A.




reply via email to

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