mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 14:31:12 +00:00
target/arm: Remove unnecessary range check for VSHL
In 1dc8425e551, while converting to gvec, I added an extra range check against the shift count. This was unnecessary because the encoding of the shift count produces 0 to the element size - 1. Backports commit 2f27c5244db300387f15d9ffa5067a204ffd625d from qemu
This commit is contained in:
parent
6190be3191
commit
7a1750d691
|
@ -5857,16 +5857,8 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
|
|||
gen_gvec_sli(tcg_ctx, size, rd_ofs, rm_ofs, shift,
|
||||
vec_size, vec_size);
|
||||
} else { /* VSHL */
|
||||
/* Shifts larger than the element size are
|
||||
* architecturally valid and results in zero.
|
||||
*/
|
||||
if (shift >= 8 << size) {
|
||||
tcg_gen_gvec_dup_imm(tcg_ctx, size, rd_ofs,
|
||||
vec_size, vec_size, 0);
|
||||
} else {
|
||||
tcg_gen_gvec_shli(tcg_ctx, size, rd_ofs, rm_ofs, shift,
|
||||
vec_size, vec_size);
|
||||
}
|
||||
tcg_gen_gvec_shli(tcg_ctx, size, rd_ofs, rm_ofs, shift,
|
||||
vec_size, vec_size);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue