On 17 January 2018 at 16:14, Richard Henderson <richard.hender...@linaro.org> wrote: > Some functions use intN_t arguments, some use uintN_t, some just > used "unsigned". To aid putting function pointers in tables, we > need consistency. > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > tcg/tcg-op.h | 16 ++++++++-------- > tcg/tcg-op.c | 42 +++++++++++++++++++++--------------------- > 2 files changed, 29 insertions(+), 29 deletions(-) > > diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h > index 9b0560e4d3..df2eabaa67 100644 > --- a/tcg/tcg-op.h > +++ b/tcg/tcg-op.h > @@ -269,12 +269,12 @@ void tcg_gen_mb(TCGBar); > void tcg_gen_addi_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); > void tcg_gen_subfi_i32(TCGv_i32 ret, int32_t arg1, TCGv_i32 arg2); > void tcg_gen_subi_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); > -void tcg_gen_andi_i32(TCGv_i32 ret, TCGv_i32 arg1, uint32_t arg2); > +void tcg_gen_andi_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); > void tcg_gen_ori_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); > void tcg_gen_xori_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); > -void tcg_gen_shli_i32(TCGv_i32 ret, TCGv_i32 arg1, unsigned arg2); > -void tcg_gen_shri_i32(TCGv_i32 ret, TCGv_i32 arg1, unsigned arg2); > -void tcg_gen_sari_i32(TCGv_i32 ret, TCGv_i32 arg1, unsigned arg2); > +void tcg_gen_shli_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); > +void tcg_gen_shri_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); > +void tcg_gen_sari_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); > void tcg_gen_muli_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); > void tcg_gen_div_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2); > void tcg_gen_rem_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2); > @@ -458,12 +458,12 @@ static inline void tcg_gen_not_i32(TCGv_i32 ret, > TCGv_i32 arg) > void tcg_gen_addi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2); > void tcg_gen_subfi_i64(TCGv_i64 ret, int64_t arg1, TCGv_i64 arg2); > void tcg_gen_subi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2); > -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... Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM