From: Aurelien Jarno <aurelien@aurel32.net>
To: Richard Henderson <rth@twiddle.net>
Cc: pbonzini@redhat.com, leon.alrae@imgtec.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.4] tcg/i386: Implement trunc_shr_i32
Date: Sat, 18 Jul 2015 23:18:51 +0200 [thread overview]
Message-ID: <20150718211851.GA12765@aurel32.net> (raw)
In-Reply-To: <1437206294-22407-1-git-send-email-rth@twiddle.net>
On 2015-07-18 08:58, Richard Henderson wrote:
> Enforce the invariant that 32-bit quantities are zero extended
> in the register. This avoids having to re-zero-extend at memory
> accesses for 32-bit guests.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
> Here's an alternative to the other things we've been considering.
> We could even make this conditional on USER_ONLY if you like.
>
> This does in fact fix the mips test case. Consider the fact that
> memory operations are probably more common than truncations, and
> it would seem that we have a net size win by forcing the truncate
> over adding a byte for the ADDR32 (or 2 bytes for a zero-extend).
I think we should go with your previous patch for 2.4, and think calmly
about how to do that better for 2.5. It slightly increases the generated
code, but only in bytes, not in number of instructions, so I don't think
the performance impact is huge.
> Indeed, for 2.5, we could look at dropping the existing zero-extend
> from the softmmu path. Also for 2.5, split trunc_shr into two parts,
From a quick look, we need to move the address to new registers anyway,
so not zero-extending will mean adding the REXW prefix.
> trunc_lo and trunc_hi. No one really uses any other value for the
> shift, and x86 could really use different constraints for the two.
That sounds like a good idea.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2015-07-18 21:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-18 7:58 [Qemu-devel] [PATCH for-2.4] tcg/i386: Implement trunc_shr_i32 Richard Henderson
2015-07-18 21:18 ` Aurelien Jarno [this message]
2015-07-19 11:26 ` Aurelien Jarno
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=20150718211851.GA12765@aurel32.net \
--to=aurelien@aurel32.net \
--cc=leon.alrae@imgtec.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).