On 9/2/21 2:40 PM, Song Gao wrote:
+static bool gen_mov(DisasContext *ctx, arg_fmt_fdfj *a, + void (*func)(TCGv, TCGv)) +{ + TCGv dest = cpu_fpr[a->fd]; + TCGv src = cpu_fpr[a->fj];
Maybe clearer as gen_f2f, to match the others?
+static void gen_movfrh2gr_s(TCGv dest, TCGv src) +{ + TCGv t0 = tcg_temp_new(); + + tcg_gen_extract_tl(dest, src, 32, 32); + + tcg_temp_free(t0); +}
t0 is unused. Use sextract_tl, or sari_tl...
+TRANS(movfr2gr_s, gen_f2r, EXT_NONE, tcg_gen_ext32s_tl) +TRANS(movfr2gr_d, gen_f2r, EXT_NONE, tcg_gen_mov_tl) +TRANS(movfrh2gr_s, gen_f2r, EXT_SIGN, gen_movfrh2gr_s)
... which then means you don't need the EXT_SIGN here, and can drop the parameter entirely. r~