[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~
- [Qemu-devel] [PATCH v10.5 00/20] tcg: generic vector operations, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 03/20] tcg: Standardize integral arguments to expanders, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 02/20] tcg: Add types and basic operations for host vectors, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 06/20] tcg: Add generic vector ops for comparisons, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 07/20] tcg: Add generic vector ops for multiplication, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 05/20] tcg: Add generic vector ops for constant shifts, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 04/20] tcg: Add generic vector expanders, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 08/20] tcg: Add generic helpers for saturating arithmetic, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 09/20] tcg: Add generic vector helpers with a scalar operand, Richard Henderson, 2018/01/17