qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tcg/aarch64: refactoring, remove inline magic i


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] tcg/aarch64: refactoring, remove inline magic insn numbers
Date: Fri, 28 Feb 2014 08:21:32 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/28/2014 12:33 AM, Claudio Fontana wrote:
> ping?
> 
> Richard, do you prefer to spin your polishing from last year instead?

I do prefer my patch set over this.

>> +    INSN_IMM       = 0x10000000, /* 3.4.1, 3.4.4  - add/sub and logical */
>> +    INSN_SHIFT     = 0x1ac02000, /* 3.5.8 - Data proc (2 source) */
...
>> +enum a64_insn_arith {
>> +    ARITH_ADD  = 0x01 << 24,
>> +    ARITH_ADDS = 0x21 << 24,
>> +    ARITH_SUB  = 0x41 << 24,
>> +    ARITH_SUBS = 0x61 << 24,
>> +
>> +    ARITH_AND  = 0x00 << 24,
>> +    ARITH_OR   = 0x20 << 24,
>> +    ARITH_XOR  = 0x40 << 24,
>> +    ARITH_ANDS = 0x60 << 24,
>>  };
...
>> +enum a64_insn_imm_arith { /* 3.4.1 */
>> +    IMM_ADD  = 0x01 << 24,
>> +    IMM_ADDS = 0x21 << 24,
>> +    IMM_SUB  = 0x41 << 24,
>> +    IMM_SUBS = 0x61 << 24
...
>> +enum a64_insn_imm_log { /* 3.4.4 */
>> +    IMM_AND  = 0x02 << 24,
>> +    IMM_OR   = 0x22 << 24,
>> +    IMM_XOR  = 0x42 << 24,
>> +    IMM_ANDS = 0x62 << 24,
>> +};

In particular, I'm not keen on these opcode / subopcode splits. They just make
the source more confusing to read, and in my experience aren't helpful in
practice. It's just as easy to put them together into e.g. a single "ADDI" 
symbol.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]