diff options
author | Mike Pall <mike> | 2021-03-23 00:28:03 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2021-03-23 00:28:03 +0100 |
commit | de89c602c285bc0226dbfcd9e31dc61ff8c49e4f (patch) | |
tree | ef5a429073265c43fd86f2f0b5d51726775e1028 /src | |
parent | dbb78630169a8106b355a5be8af627e98c362f1e (diff) | |
download | luajit-de89c602c285bc0226dbfcd9e31dc61ff8c49e4f.tar.gz luajit-de89c602c285bc0226dbfcd9e31dc61ff8c49e4f.tar.bz2 luajit-de89c602c285bc0226dbfcd9e31dc61ff8c49e4f.zip |
PPC: Fix GG_State loads.
Diffstat (limited to '')
-rw-r--r-- | src/lj_asm_ppc.h | 2 | ||||
-rw-r--r-- | src/lj_ir.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h index 579f8e2a..88869d9d 100644 --- a/src/lj_asm_ppc.h +++ b/src/lj_asm_ppc.h | |||
@@ -894,7 +894,7 @@ static void asm_fload(ASMState *as, IRIns *ir) | |||
894 | int32_t ofs; | 894 | int32_t ofs; |
895 | if (ir->op1 == REF_NIL) { /* FLOAD from GG_State with offset. */ | 895 | if (ir->op1 == REF_NIL) { /* FLOAD from GG_State with offset. */ |
896 | idx = RID_JGL; | 896 | idx = RID_JGL; |
897 | ofs = (ir->op2 << 2) - 32768; | 897 | ofs = (ir->op2 << 2) - 32768 - GG_OFS(g); |
898 | } else { | 898 | } else { |
899 | idx = ra_alloc1(as, ir->op1, RSET_GPR); | 899 | idx = ra_alloc1(as, ir->op1, RSET_GPR); |
900 | if (ir->op2 == IRFL_TAB_ARRAY) { | 900 | if (ir->op2 == IRFL_TAB_ARRAY) { |
diff --git a/src/lj_ir.c b/src/lj_ir.c index 4be11a61..29d75d26 100644 --- a/src/lj_ir.c +++ b/src/lj_ir.c | |||
@@ -147,7 +147,7 @@ TRef lj_ir_call(jit_State *J, IRCallID id, ...) | |||
147 | } | 147 | } |
148 | 148 | ||
149 | /* Load field of type t from GG_State + offset. Must be 32 bit aligned. */ | 149 | /* Load field of type t from GG_State + offset. Must be 32 bit aligned. */ |
150 | LJ_FUNC TRef lj_ir_ggfload(jit_State *J, IRType t, uintptr_t ofs) | 150 | TRef lj_ir_ggfload(jit_State *J, IRType t, uintptr_t ofs) |
151 | { | 151 | { |
152 | lj_assertJ((ofs & 3) == 0, "unaligned GG_State field offset"); | 152 | lj_assertJ((ofs & 3) == 0, "unaligned GG_State field offset"); |
153 | ofs >>= 2; | 153 | ofs >>= 2; |