[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/4] tcg-hppa: Finish the port.
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 2/4] tcg-hppa: Finish the port. |
Date: |
Thu, 08 Apr 2010 14:48:54 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4 |
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~
- Re: [Qemu-devel] [PATCH 1/4] tcg-hppa: Compute is_write in cpu_signal_handler., (continued)