On 3/4/19 7:13 AM, Mateja Marjanovic wrote: > + uint64_t mask = (1ULL << 16) - 1; > + > + tcg_gen_andi_i64(t0, cpu_gpr[rt], mask); > + tcg_gen_movi_i64(t1, 0); > + tcg_gen_or_i64(t1, t0, t1); > + tcg_gen_shli_i64(t0, t0, 16); > + tcg_gen_or_i64(t1, t0, t1); > + tcg_gen_shli_i64(t0, t0, 16); > + tcg_gen_or_i64(t1, t0, t1); > + tcg_gen_shli_i64(t0, t0, 16); > + tcg_gen_or_i64(t1, t0, t1);
I have suggested a better way to write this, twice, the third time is surely the charm... tcg_gen_deposit_i64(t0, cpu_gpr[rt], cpu_gpr[rt], 16, 48); tcg_gen_deposit_i64(t0, t0, t0, 32, 32); r~