From: Thiemo Seufer <ths@networkno.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu hw/mips_r4k.c target-mips/cpu.h target-mip...
Date: Thu, 21 Dec 2006 15:27:33 +0000 [thread overview]
Message-ID: <20061221152732.GD30873@networkno.de> (raw)
In-Reply-To: <2ad73a0612210646q139ef8femf608cd17478b55ed@mail.gmail.com>
André Braga wrote:
> On 12/21/06, Thiemo Seufer <ths@networkno.de> 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
next prev parent reply other threads:[~2006-12-21 15:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-21 1:19 [Qemu-devel] qemu hw/mips_r4k.c target-mips/cpu.h target-mip Thiemo Seufer
2006-12-21 9:45 ` Fabrice Bellard
2006-12-21 11:32 ` Thiemo Seufer
2006-12-21 12:45 ` Thiemo Seufer
2006-12-21 14:46 ` André Braga
2006-12-21 15:27 ` Thiemo Seufer [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-12-21 13:48 Thiemo Seufer
2006-12-06 17:48 Thiemo Seufer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061221152732.GD30873@networkno.de \
--to=ths@networkno.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.