qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 66/68] target/arm: Convert T16, long branches


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 66/68] target/arm: Convert T16, long branches
Date: Tue, 27 Aug 2019 17:07:13 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 8/27/19 2:34 AM, Peter Maydell wrote:
>> +    tcg_gen_andi_i32(tmp, tmp, -4);
> 
> Minor nit, but can we use 0xfffffffc like the old code did,
> to avoid the reader having to do 2s-complement arithmetic
> in their head to figure out that we're clearing the low 2 bits?

I always preferred "x & -c" for exactly the same reason:
to avoid the reader having to do 2s compliment arithmetic
in their head to figure out that we're aligning to c.

But, sure, if you like.

> This would be a good place to put a comment equivalent to that
> in the old decoder:
> 
> # thumb_insn_is_16bit() ensures we won't be decoding these as
> # T16 instructions for a Thumb2 CPU, so these patterns must be
> # a Thumb1 split BL/BLX.
> 
>> +BLX_suffix      11101 imm:11                    &i
>> +BL_BLX_prefix   11110 imm:s11                   &i
>> +BL_suffix       11111 imm:11                    &i

I had placed that with trans_BL_BLX_prefix, but I suppose this
is a better place.


r~



reply via email to

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