Increase range of GG_State loads via IR_FLOAD with REF_NIL.

Require 32 bit alignment and store offset/4 instead.
Otherwise this can overflow the 10 bit limit for the FOLD op2 key.
This commit is contained in:
Mike Pall
2016-11-19 19:53:46 +01:00
parent 5400c1e424
commit e577db52c5
4 changed files with 8 additions and 6 deletions

View File

@@ -809,7 +809,7 @@ static void asm_fload(ASMState *as, IRIns *ir)
int32_t ofs;
if (ir->op1 == REF_NIL) {
idx = RID_JGL;
ofs = ir->op2 - 32768;
ofs = (ir->op2 << 2) - 32768;
} else {
idx = ra_alloc1(as, ir->op1, RSET_GPR);
if (ir->op2 == IRFL_TAB_ARRAY) {