mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 22:18:07 +00:00
target/arm: Fix do_predset for large VL
Use MAKE_64BIT_MASK instead of open-coding. Remove an odd vector size check that is unlikely to be more profitable than 3 64-bit integer stores. Correct the iteration for WORD to avoid writing too much data. Fixes RISU tests of PTRUE for VL 256. Backports commit 973558a3f869e591d2406dd8226ec0c4e32a3c3e from qemu
This commit is contained in:
parent
f1aaf5be62
commit
ee24dff90c
1 changed files with 2 additions and 8 deletions
|
@ -1535,7 +1535,7 @@ static bool do_predset(DisasContext *s, int esz, int rd, int pat, bool setflag)
|
|||
setsz = numelem << esz;
|
||||
lastword = word = pred_esz_masks[esz];
|
||||
if (setsz % 64) {
|
||||
lastword &= ~(-1ull << (setsz % 64));
|
||||
lastword &= MAKE_64BIT_MASK(0, setsz % 64);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1554,19 +1554,13 @@ static bool do_predset(DisasContext *s, int esz, int rd, int pat, bool setflag)
|
|||
tcg_gen_gvec_dup64i(tcg_ctx, ofs, oprsz, maxsz, word);
|
||||
goto done;
|
||||
}
|
||||
if (oprsz * 8 == setsz + 8) {
|
||||
tcg_gen_gvec_dup64i(tcg_ctx, ofs, oprsz, maxsz, word);
|
||||
tcg_gen_movi_i64(tcg_ctx, t, 0);
|
||||
tcg_gen_st_i64(tcg_ctx, t, tcg_ctx->cpu_env, ofs + oprsz - 8);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
setsz /= 8;
|
||||
fullsz /= 8;
|
||||
|
||||
tcg_gen_movi_i64(tcg_ctx, t, word);
|
||||
for (i = 0; i < setsz; i += 8) {
|
||||
for (i = 0; i < QEMU_ALIGN_DOWN(setsz, 8); i += 8) {
|
||||
tcg_gen_st_i64(tcg_ctx, t, tcg_ctx->cpu_env, ofs + i);
|
||||
}
|
||||
if (lastword != word) {
|
||||
|
|
Loading…
Reference in a new issue