mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-22 19:15:36 +00:00
target/arm: Update PFIRST, PNEXT for pred_desc
These two were odd, in that do_pfirst_pnext passed the count of 64-bit words rather than bytes. Change to pass the standard pred_full_reg_size to avoid confusion. Backports 86300b5d044064046395ae8ed605cc19e63f2a7c
This commit is contained in:
parent
4ef4735cd3
commit
fac4e416c9
|
@ -888,8 +888,9 @@ static intptr_t last_active_element(uint64_t *g, intptr_t words, intptr_t esz)
|
|||
return (intptr_t)-1 << esz;
|
||||
}
|
||||
|
||||
uint32_t HELPER(sve_pfirst)(void *vd, void *vg, uint32_t words)
|
||||
uint32_t HELPER(sve_pfirst)(void *vd, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t words = DIV_ROUND_UP(FIELD_EX32(pred_desc, PREDDESC, OPRSZ), 8);
|
||||
uint32_t flags = PREDTEST_INIT;
|
||||
uint64_t *d = vd, *g = vg;
|
||||
intptr_t i = 0;
|
||||
|
@ -913,8 +914,8 @@ uint32_t HELPER(sve_pfirst)(void *vd, void *vg, uint32_t words)
|
|||
|
||||
uint32_t HELPER(sve_pnext)(void *vd, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t words = extract32(pred_desc, 0, SIMD_OPRSZ_BITS);
|
||||
intptr_t esz = extract32(pred_desc, SIMD_DATA_SHIFT, 2);
|
||||
intptr_t words = DIV_ROUND_UP(FIELD_EX32(pred_desc, PREDDESC, OPRSZ), 8);
|
||||
intptr_t esz = FIELD_EX32(pred_desc, PREDDESC, ESZ);
|
||||
uint32_t flags = PREDTEST_INIT;
|
||||
uint64_t *d = vd, *g = vg, esz_mask;
|
||||
intptr_t i, next;
|
||||
|
|
|
@ -1545,10 +1545,10 @@ static bool do_pfirst_pnext(DisasContext *s, arg_rr_esz *a,
|
|||
TCGv_ptr t_pd = tcg_temp_new_ptr(tcg_ctx);
|
||||
TCGv_ptr t_pg = tcg_temp_new_ptr(tcg_ctx);
|
||||
TCGv_i32 t;
|
||||
unsigned desc;
|
||||
unsigned desc = 0;
|
||||
|
||||
desc = DIV_ROUND_UP(pred_full_reg_size(s), 8);
|
||||
desc = deposit32(desc, SIMD_DATA_SHIFT, 2, a->esz);
|
||||
desc = FIELD_DP32(desc, PREDDESC, OPRSZ, pred_full_reg_size(s));
|
||||
desc = FIELD_DP32(desc, PREDDESC, ESZ, a->esz);
|
||||
|
||||
tcg_gen_addi_ptr(tcg_ctx, t_pd, tcg_ctx->cpu_env, pred_full_reg_offset(s, a->rd));
|
||||
tcg_gen_addi_ptr(tcg_ctx, t_pg, tcg_ctx->cpu_env, pred_full_reg_offset(s, a->rn));
|
||||
|
|
Loading…
Reference in a new issue