On 08/05/2018 11:28 AM, Pavel Zbitskiy wrote: > + tcg_gen_andi_i64(t1, psw_mask, 0x00000f0000000000); > + tcg_gen_shri_i64(t1, t1, 16);
It would be better to swap these two operations, so that a 64-bit constant isn't needed for the mask, e.g: tcg_gen_shri_i64(t1, psw_mask, 16); tcg_gen_andi_i64(t1, t1, 0xf000000); Or maybe rewrite this whole function with extract/deposit: tcg_gen_extract_i64(t1, psw_mask, 40, 4); tcg_gen_extu_i32_i64(t2, cc_op); tcg_gen_deposit_i64(t1, t1, t2, 4, 60); tcg_gen_deposit_i64(o->out, o->out, t1, 24, 8); But what you have is not wrong so, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~