]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Merge branch 'master' into v2.1
authorMike Pall <mike>
Sat, 25 May 2024 14:41:53 +0000 (16:41 +0200)
committerMike Pall <mike>
Sat, 25 May 2024 14:41:53 +0000 (16:41 +0200)
1  2 
src/lj_snap.c

diff --cc src/lj_snap.c
index f3645e87676763c2ac1cae73850f844729447d7e,9858c1102e1b15eb23f663ec39c4e79017b6a42e..6fda08ba32a005784126eaad466564709005fccb
@@@ -815,11 -744,12 +814,14 @@@ static void snap_restoredata(jit_State 
  #endif
        } else
  #endif
-       if (LJ_64 && LJ_BE && sz == 4) src++;
+       {
+       src = (int32_t *)&ex->gpr[r-RID_MIN_GPR];
++      if (LJ_64 && LJ_BE && sz == 4) src++;
+       }
      }
    }
 -  lua_assert(sz == 1 || sz == 2 || sz == 4 || sz == 8);
 +  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;
    else if (sz == 8) *(int64_t *)dst = *(int64_t *)src;
    else if (sz == 1) *(int8_t *)dst = (int8_t)*src;