Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall 2024-05-25 16:41:53 +02:00
commit f5587f5eb3

View File

@ -801,7 +801,6 @@ static void snap_restoredata(jit_State *J, GCtrace *T, ExitState *ex,
*(lua_Number *)dst = (lua_Number)*(int32_t *)dst;
return;
}
src = (int32_t *)&ex->gpr[r-RID_MIN_GPR];
#if !LJ_SOFTFP
if (r >= RID_MAX_GPR) {
src = (int32_t *)&ex->fpr[r-RID_MIN_FPR];
@ -815,9 +814,12 @@ static void snap_restoredata(jit_State *J, GCtrace *T, ExitState *ex,
#endif
} else
#endif
{
src = (int32_t *)&ex->gpr[r-RID_MIN_GPR];
if (LJ_64 && LJ_BE && sz == 4) src++;
}
}
}
lj_assertJ(sz == 1 || sz == 2 || sz == 4 || sz == 8,
"restore from IR %04d with bad size %d", ref - REF_BIAS, sz);
if (sz == 4) *(int32_t *)dst = *src;