André Braga wrote: > On 12/21/06, Thiemo Seufer <[EMAIL PROTECTED]> 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,
Only iff it is redundant, which is what we want to achieve. > 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). Currently it appears to work as is. Given that the CPU env is a global it is unlikely gcc can use fancy optimizations. When compiling with -combine we may need to declare the emulated machine registers volatile. > IMHO macros like these SHOULD stay, as they are mostly innocuous and > happen to document the target machine behaviour. I disagree, it clutters the source more, and a cast provides the same information. Thiemo _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel