Explorar o código

PPC: Fix GG_State loads.

Mike Pall %!s(int64=4) %!d(string=hai) anos
pai
achega
de89c602c2
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      src/lj_asm_ppc.h
  2. 1 1
      src/lj_ir.c

+ 1 - 1
src/lj_asm_ppc.h

@@ -894,7 +894,7 @@ static void asm_fload(ASMState *as, IRIns *ir)
   int32_t ofs;
   if (ir->op1 == REF_NIL) {  /* FLOAD from GG_State with offset. */
     idx = RID_JGL;
-    ofs = (ir->op2 << 2) - 32768;
+    ofs = (ir->op2 << 2) - 32768 - GG_OFS(g);
   } else {
     idx = ra_alloc1(as, ir->op1, RSET_GPR);
     if (ir->op2 == IRFL_TAB_ARRAY) {

+ 1 - 1
src/lj_ir.c

@@ -147,7 +147,7 @@ TRef lj_ir_call(jit_State *J, IRCallID id, ...)
 }
 
 /* Load field of type t from GG_State + offset. Must be 32 bit aligned. */
-LJ_FUNC TRef lj_ir_ggfload(jit_State *J, IRType t, uintptr_t ofs)
+TRef lj_ir_ggfload(jit_State *J, IRType t, uintptr_t ofs)
 {
   lj_assertJ((ofs & 3) == 0, "unaligned GG_State field offset");
   ofs >>= 2;