LJ_GC64: Add support for 64 bit GCobj constants in the IR.

Contributed by Peter Cawley.
This commit is contained in:
Mike Pall
2016-05-23 00:34:05 +02:00
parent 9e99ccc360
commit f26679c719
3 changed files with 33 additions and 13 deletions

View File

@@ -557,8 +557,7 @@ typedef union IRIns {
TValue tv; /* TValue constant (overlaps entire slot). */
} IRIns;
/* TODO_GC64: major changes required. */
#define ir_kgc(ir) check_exp((ir)->o == IR_KGC, gcref((ir)->gcr))
#define ir_kgc(ir) check_exp((ir)->o == IR_KGC, gcref((ir)[LJ_GC64].gcr))
#define ir_kstr(ir) (gco2str(ir_kgc((ir))))
#define ir_ktab(ir) (gco2tab(ir_kgc((ir))))
#define ir_kfunc(ir) (gco2func(ir_kgc((ir))))
@@ -568,7 +567,8 @@ typedef union IRIns {
#define ir_k64(ir) \
check_exp((ir)->o == IR_KNUM || (ir)->o == IR_KINT64, &(ir)[1].tv)
#define ir_kptr(ir) \
check_exp((ir)->o == IR_KPTR || (ir)->o == IR_KKPTR, mref((ir)->ptr, void))
check_exp((ir)->o == IR_KPTR || (ir)->o == IR_KKPTR, \
mref((ir)[LJ_GC64].ptr, void))
/* A store or any other op with a non-weak guard has a side-effect. */
static LJ_AINLINE int ir_sideeff(IRIns *ir)