[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 05/20] tcg-arm: Handle constant arguments to
From: |
Laurent Desnogues |
Subject: |
Re: [Qemu-devel] [PATCH v3 05/20] tcg-arm: Handle constant arguments to add2/sub2 |
Date: |
Thu, 28 Mar 2013 17:09:42 +0100 |
On Thu, Mar 28, 2013 at 5:04 PM, Richard Henderson <address@hidden> wrote:
> On 03/28/2013 08:56 AM, Peter Maydell wrote:
>>> +#define TO_CPSR (1 << 20)
>>
>> This is the S bit; I think it would be helpful if our #define
>> had a name that made that clearer...
>
> Suggestions? I thought "TO_CPSR" was clear...
SET_FLAGS?
>>> + ARITH_TST = 0x8 << 21 | TO_CPSR,
>>> + ARITH_CMP = 0xa << 21 | TO_CPSR,
>>> + ARITH_CMN = 0xb << 21 | TO_CPSR,
>>> + ARITH_ORR = 0xc << 21,
>>> + ARITH_MOV = 0xd << 21,
>>> + ARITH_BIC = 0xe << 21,
>>> + ARITH_MVN = 0xf << 21,
>>> };
>>
>> It feels a little ugly to OR in the S bit in this enum, but I guess
>> it works.
>
> I think it actually makes everything a lot cleaner myself. Especially given
> the previous definition that required runtime checks for TST et al.
I also find this cleaner. OTOH I understand that Peter finds it
odd given that other operations (such as ADD) can optionally
set flags.
Laurent
[Qemu-devel] [PATCH v3 03/20] tcg-arm: Allow constant first argument to sub, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 06/20] tcg-arm: Improve constant generation, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 07/20] tcg-arm: Fold epilogue into INDEX_op_exit_tb, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 08/20] tcg-arm: Implement deposit for armv7, Richard Henderson, 2013/03/28