qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v10.5 03/20] tcg: Standardize integral arguments


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v10.5 03/20] tcg: Standardize integral arguments to expanders
Date: Mon, 22 Jan 2018 12:04:57 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/22/2018 11:17 AM, Peter Maydell wrote:
>> -void tcg_gen_andi_i64(TCGv_i64 ret, TCGv_i64 arg1, uint64_t arg2);
>> +void tcg_gen_andi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2);
> 
> Does changing these types from unsigned to signed definitely
> not result in any possible change in behaviour of frontend
> code if there's now an unintended sign extension ? I thought
> maybe there was, but now I think I was confused and this is safe...

It definitely does not.

For andi, we pass the value along to movi, which always has examined only the
low 32-bits.  For the shifts, we assert the value is 0 <= x < 32.


r~



reply via email to

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