[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 09/11] tcg-aarch64: Use 32-bit loads for qemu_ld_
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PULL 09/11] tcg-aarch64: Use 32-bit loads for qemu_ld_i32 |
Date: |
Wed, 24 Sep 2014 08:19:34 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
On 09/24/2014 01:20 AM, Claudio Fontana wrote:
>> @@ -1118,7 +1119,8 @@ static void tcg_out_qemu_ld_direct(TCGContext *s,
>> TCGMemOp memop,
>> tcg_out_ldst_r(s, I3312_LDRB, data_r, addr_r, off_r);
>> break;
>> case MO_SB:
>> - tcg_out_ldst_r(s, I3312_LDRSBX, data_r, addr_r, off_r);
>> + tcg_out_ldst_r(s, type ? I3312_LDRSBX : I3312_LDRSBW,
>> + data_r, addr_r, off_r);
>
>
> since we are using the enum type TCGType, why do we check type as "type ?"
>
> I would have expected the conditional to be something like
>
> type == TCG_TYPE_I32 ? I3312_LDRSBW : I3312_LDRSBX
>
> It's pretty obvious what is happening but it might spare someone a lookup
> into the header file
> to test that type 0 is indeed TCG_TYPE_I32.
We assert the boolean-ish nature of TCGType at the start of the file, and use
it for the "ext" variable throughout. Would it help if the variable weren't
named "type"?
r~
- Re: [Qemu-devel] [PULL 07/11] tcg: Compress TCGLabelQemuLdst, (continued)
[Qemu-devel] [PULL 06/11] tcg-sparc: Use UMULXHI instruction, Richard Henderson, 2014/09/22
[Qemu-devel] [PULL 08/11] tcg: Move TCG_TYPE_COUNT out of enum TCGType, Richard Henderson, 2014/09/22
[Qemu-devel] [PULL 10/11] qemu/compiler: Define QEMU_ARTIFICIAL, Richard Henderson, 2014/09/22
[Qemu-devel] [PULL 11/11] tcg: Always enable TCGv type checking, Richard Henderson, 2014/09/22
[Qemu-devel] [PULL 09/11] tcg-aarch64: Use 32-bit loads for qemu_ld_i32, Richard Henderson, 2014/09/22