diff options
author | Mike Pall <mike> | 2010-09-14 19:58:27 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2010-09-14 19:58:27 +0200 |
commit | 8dc76ee3276e504d739818322e4dff37e6ae1c11 (patch) | |
tree | a46fc1ccfa6b2926f22b322c98412cd99fba09e1 /src/lj_record.c | |
parent | 23655bd52ebffd0a4bdb9d34009816f9ca501f04 (diff) | |
download | luajit-8dc76ee3276e504d739818322e4dff37e6ae1c11.tar.gz luajit-8dc76ee3276e504d739818322e4dff37e6ae1c11.tar.bz2 luajit-8dc76ee3276e504d739818322e4dff37e6ae1c11.zip |
Add IR_VLOAD for vararg loads.
Also fixes the broken AA improvement in the last commit.
Diffstat (limited to 'src/lj_record.c')
-rw-r--r-- | src/lj_record.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index 42bcca1a..6e396729 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -1998,7 +1998,7 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults) | |||
1998 | IRType t = itype2irt(&J->L->base[i-1-nvararg]); | 1998 | IRType t = itype2irt(&J->L->base[i-1-nvararg]); |
1999 | TRef aref = emitir(IRT(IR_AREF, IRT_PTR), | 1999 | TRef aref = emitir(IRT(IR_AREF, IRT_PTR), |
2000 | vbase, lj_ir_kint(J, (int32_t)i)); | 2000 | vbase, lj_ir_kint(J, (int32_t)i)); |
2001 | TRef tr = emitir(IRTG(IR_ALOAD, t), aref, 0); | 2001 | TRef tr = emitir(IRTG(IR_VLOAD, t), aref, 0); |
2002 | if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */ | 2002 | if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */ |
2003 | J->base[dst+i] = tr; | 2003 | J->base[dst+i] = tr; |
2004 | } | 2004 | } |
@@ -2044,7 +2044,7 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults) | |||
2044 | vbase = emitir(IRT(IR_ADD, IRT_PTR), vbase, lj_ir_kint(J, frofs-8)); | 2044 | vbase = emitir(IRT(IR_ADD, IRT_PTR), vbase, lj_ir_kint(J, frofs-8)); |
2045 | t = itype2irt(&J->L->base[idx-2-nvararg]); | 2045 | t = itype2irt(&J->L->base[idx-2-nvararg]); |
2046 | aref = emitir(IRT(IR_AREF, IRT_PTR), vbase, tridx); | 2046 | aref = emitir(IRT(IR_AREF, IRT_PTR), vbase, tridx); |
2047 | tr = emitir(IRTG(IR_ALOAD, t), aref, 0); | 2047 | tr = emitir(IRTG(IR_VLOAD, t), aref, 0); |
2048 | if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */ | 2048 | if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */ |
2049 | } | 2049 | } |
2050 | J->base[dst-2] = tr; | 2050 | J->base[dst-2] = tr; |