mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-24 22:15:07 +00:00
target/arm: Clear SVE high bits for FMOV
Use write_fp_dreg and clear_vec_high to zero the bits that need zeroing for these cases. Backports commit 9a9f1f59521f46e8ff4527d9a2b52f83577e2aa3 from qemu
This commit is contained in:
parent
67740bbc7f
commit
5902f32abf
|
@ -5783,31 +5783,24 @@ static void handle_fmov(DisasContext *s, int rd, int rn, int type, bool itof)
|
||||||
|
|
||||||
if (itof) {
|
if (itof) {
|
||||||
TCGv_i64 tcg_rn = cpu_reg(s, rn);
|
TCGv_i64 tcg_rn = cpu_reg(s, rn);
|
||||||
|
TCGv_i64 tmp;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
|
||||||
/* 32 bit */
|
/* 32 bit */
|
||||||
TCGv_i64 tmp = tcg_temp_new_i64(tcg_ctx);
|
tmp = tcg_temp_new_i64(tcg_ctx);
|
||||||
tcg_gen_ext32u_i64(tcg_ctx, tmp, tcg_rn);
|
tcg_gen_ext32u_i64(tcg_ctx, tmp, tcg_rn);
|
||||||
tcg_gen_st_i64(tcg_ctx, tmp, tcg_ctx->cpu_env, fp_reg_offset(s, rd, MO_64));
|
write_fp_dreg(s, rd, tmp);
|
||||||
tcg_gen_movi_i64(tcg_ctx, tmp, 0);
|
|
||||||
tcg_gen_st_i64(tcg_ctx, tmp, tcg_ctx->cpu_env, fp_reg_hi_offset(s, rd));
|
|
||||||
tcg_temp_free_i64(tcg_ctx, tmp);
|
tcg_temp_free_i64(tcg_ctx, tmp);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 1:
|
case 1:
|
||||||
{
|
|
||||||
/* 64 bit */
|
/* 64 bit */
|
||||||
TCGv_i64 tmp = tcg_const_i64(tcg_ctx, 0);
|
write_fp_dreg(s, rd, tcg_rn);
|
||||||
tcg_gen_st_i64(tcg_ctx, tcg_rn, tcg_ctx->cpu_env, fp_reg_offset(s, rd, MO_64));
|
|
||||||
tcg_gen_st_i64(tcg_ctx, tmp, tcg_ctx->cpu_env, fp_reg_hi_offset(s, rd));
|
|
||||||
tcg_temp_free_i64(tcg_ctx, tmp);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 2:
|
case 2:
|
||||||
/* 64 bit to top half. */
|
/* 64 bit to top half. */
|
||||||
tcg_gen_st_i64(tcg_ctx, tcg_rn, tcg_ctx->cpu_env, fp_reg_hi_offset(s, rd));
|
tcg_gen_st_i64(tcg_ctx, tcg_rn, tcg_ctx->cpu_env, fp_reg_hi_offset(s, rd));
|
||||||
|
clear_vec_high(s, true, rd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue