From: Richard Henderson <rth@twiddle.net>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/4] tcg-hppa: Finish the port.
Date: Thu, 08 Apr 2010 14:48:54 -0700 [thread overview]
Message-ID: <4BBE4F46.7090307@twiddle.net> (raw)
In-Reply-To: <4BBE0529.7000404@twiddle.net>
On 04/08/2010 09:32 AM, Richard Henderson wrote:
>>> +static void tcg_out_ori(TCGContext *s, int ret, int arg, tcg_target_ulong m)
>>> +{
>>> + if (m == 0) {
>>> + tcg_out_mov(s, ret, arg);
>>> + } else if (m == -1) {
>>> + tcg_out_movi(s, TCG_TYPE_I32, ret, -1);
>>
>> Those cases are already eliminated in tcg/tcg-op.h. This code looks
>> redundant.
>
> The cases eliminated in tcg-op.h are with immediate constants.
> There is no generic code in tcg.c to eliminate these cases
> after constant propagation. However, I can remove them with...
For the record, a real case that appears in linux-test-0.3 sparc:
0x435e8ac4: andcc %g0, %g0, %o4
---- 0x435e8ac4
movi_i32 tmp19,$0x0
movi_i32 tmp20,$0x0
and_i32 loc4,tmp19,tmp20
mov_i32 cc_dst,loc4
movi_i32 cc_op,$0xb
st_i32 loc4,regwptr,$0x10
The and_i32 there is "loc4 = 0 & 0".
I've no idea why the original sparc code uses this instruction.
r~
next prev parent reply other threads:[~2010-04-08 21:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 22:33 [Qemu-devel] [PATCH 0/2] tcg-hppa finish, v3 Richard Henderson
2010-03-12 14:58 ` [Qemu-devel] [PATCH 1/2] tcg-hppa: Compute is_write in cpu_signal_handler Richard Henderson
2010-03-23 22:06 ` [Qemu-devel] [PATCH 2/2] tcg-hppa: Finish the port Richard Henderson
2010-04-07 11:45 ` [Qemu-devel] [PATCH 0/2] tcg-hppa finish, v3 Richard Henderson
2010-04-07 11:56 ` Aurelien Jarno
2010-04-07 11:56 ` [Qemu-devel] [PATCH 2/4] tcg-hppa: Finish the port Richard Henderson
2010-04-08 9:56 ` Aurelien Jarno
2010-04-08 16:32 ` Richard Henderson
2010-04-08 21:48 ` Richard Henderson [this message]
2010-04-08 23:01 ` Aurelien Jarno
2010-04-07 14:46 ` [Qemu-devel] [PATCH 3/4] tcg-hppa: Fix in/out register overlap in add2/sub2 Richard Henderson
2010-04-08 9:57 ` Aurelien Jarno
2010-04-07 23:24 ` [Qemu-devel] [PATCH 4/4] tcg-hppa: Don't try to calls to non-constant addresses Richard Henderson
2010-04-08 9:58 ` Aurelien Jarno
2010-04-07 23:29 ` [Qemu-devel] [PATCH 0/4] tcg-hppa finish, v4 Richard Henderson
2010-04-08 9:36 ` Aurelien Jarno
2010-04-07 23:42 ` [Qemu-devel] [PATCH 1/4] tcg-hppa: Compute is_write in cpu_signal_handler Richard Henderson
2010-04-08 9:36 ` 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=4BBE4F46.7090307@twiddle.net \
--to=rth@twiddle.net \
--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).