target/sparc: optimize gen_op_mulscc() using deposit op

Backports commit 08d64e0db02e826b063d2b0d8b84f1cb1f7306c9 from qemu
This commit is contained in:
Philippe Mathieu-Daudé 2018-03-03 23:21:26 -05:00 committed by Lioncash
parent 3827b167e2
commit 382dcb2deb
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -676,11 +676,8 @@ static inline void gen_op_mulscc(DisasContext *dc, TCGv dst, TCGv src1, TCGv src
// b2 = T0 & 1;
// env->y = (b2 << 31) | (env->y >> 1);
tcg_gen_andi_tl(tcg_ctx, r_temp, tcg_ctx->cpu_cc_src, 0x1);
tcg_gen_shli_tl(tcg_ctx, r_temp, r_temp, 31);
tcg_gen_extract_tl(tcg_ctx, t0, tcg_ctx->cpu_y, 1, 31);
tcg_gen_or_tl(tcg_ctx, t0, t0, r_temp);
tcg_gen_andi_tl(tcg_ctx, tcg_ctx->cpu_y, t0, 0xffffffff);
tcg_gen_deposit_tl(tcg_ctx, tcg_ctx->cpu_y, t0, tcg_ctx->cpu_cc_src, 31, 1);
// b1 = N ^ V;
gen_mov_reg_N(dc, t0, tcg_ctx->cpu_psr);