mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-11 08:45:36 +00:00
target/arm: Fix tcg_gen_gvec_dup_imm vs DUP (indexed)
DUP (indexed) can duplicate 128-bit elements, so using esz unconditionally can assert in tcg_gen_gvec_dup_imm. Fixes: 8711e71f9cbb Backports commit 7e17d50ebd359ee5fa3d65d7fdc0fe0336d60694 from qemu
This commit is contained in:
parent
5c03efd5d6
commit
4be4ca57b1
|
@ -2159,7 +2159,11 @@ static bool trans_DUP_x(DisasContext *s, arg_DUP_x *a)
|
||||||
unsigned nofs = vec_reg_offset(s, a->rn, index, esz);
|
unsigned nofs = vec_reg_offset(s, a->rn, index, esz);
|
||||||
tcg_gen_gvec_dup_mem(tcg_ctx, esz, dofs, nofs, vsz, vsz);
|
tcg_gen_gvec_dup_mem(tcg_ctx, esz, dofs, nofs, vsz, vsz);
|
||||||
} else {
|
} else {
|
||||||
tcg_gen_gvec_dup_imm(tcg_ctx, esz, dofs, vsz, vsz, 0);
|
/*
|
||||||
|
* While dup_mem handles 128-bit elements, dup_imm does not.
|
||||||
|
* Thankfully element size doesn't matter for splatting zero.
|
||||||
|
*/
|
||||||
|
tcg_gen_gvec_dup_imm(tcg_ctx, MO_64, dofs, vsz, vsz, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue