From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH 1/3] tcg: add ext{8,16,32}u_i{32,64} TCG ops
Date: Tue, 10 Nov 2009 14:51:21 +0000 [thread overview]
Message-ID: <200911101451.21466.paul@codesourcery.com> (raw)
In-Reply-To: <e388f3bbe334e3781ff318ce92d1474be6aaa99a.1254512633.git.aurelien@aurel32.net>
On Wednesday 30 September 2009, Aurelien Jarno wrote:
> Currently zero extensions ops are implemented by a and op with a
> constant. This is then catched in some backend, and replaced by
> a zero extension instruction. While this works well on RISC
> machines, this adds a useless register move on non-RISC machines.
>
> Example on x86:
> ext16u_i32 r1, r2
> is translated into
> mov %eax,%ebx
> movzwl %bx, %ebx
> while the optimized version should be:
> movzwl %ax, %ebx
I don't like your solution. Having two operations that do the same thing is
bad, especially when we have no way of converting one into the other, and no
clear indication which is best.
I think we need to understand why does the original code introduces an extra
copy. At first glance there's no good reason for it to be there.
Paul
next prev parent reply other threads:[~2009-11-10 14:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 21:09 [Qemu-devel] [PATCH 1/3] tcg: add ext{8,16,32}u_i{32,64} TCG ops Aurelien Jarno
2009-09-30 21:44 ` [Qemu-devel] [PATCH 2/3] tcg/x86_64: add support for ext{8, 16, 32}u_i{32, 64} " Aurelien Jarno
2009-10-02 18:55 ` [Qemu-devel] [PATCH 3/3] tcg/i386: " Aurelien Jarno
2009-10-02 20:07 ` [Qemu-devel] [PATCH 1/3] tcg: add ext{8,16,32}u_i{32,64} " Nathan Froyd
2009-10-02 20:54 ` Aurelien Jarno
2009-11-10 14:51 ` Paul Brook [this message]
2009-11-10 15:38 ` 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=200911101451.21466.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=aurelien@aurel32.net \
--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 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).