qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/4] tcg/aarch64: implement new TCG target for a


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 2/4] tcg/aarch64: implement new TCG target for aarch64
Date: Tue, 28 May 2013 07:52:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

On 05/28/2013 12:17 AM, Claudio Fontana wrote:
>> >     if (type == TCG_TYPE_I32) {
>> >         value = (uint32_t)value;
>> >         ext = 0;
>> >     } else if (value <= 0xffffffff) {
>> >         ext = 0;
>> >     } else {
>> >         ext = 0x80000000;
>> >     }
> The check for type is probably unnecessary, since we don't gain anything (we 
> still have to check something once), so I'd rather use a uint64_t parameter 
> and then just check for value < 0xffffffff.
> 

The check for type is necessary, because we don't guarantee that the high bits
of value are zero, sign-extended, or indeed garbage, for TYPE_I32.


r~



reply via email to

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