aboutsummaryrefslogtreecommitdiff
path: root/src/lj_ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_ir.h')
-rw-r--r--src/lj_ir.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lj_ir.h b/src/lj_ir.h
index 8a655b64..03377ec1 100644
--- a/src/lj_ir.h
+++ b/src/lj_ir.h
@@ -522,7 +522,9 @@ typedef uint32_t TRef;
522** +-------+-------+---+---+---+---+ 522** +-------+-------+---+---+---+---+
523** | op1 | op2 | t | o | r | s | 523** | op1 | op2 | t | o | r | s |
524** +-------+-------+---+---+---+---+ 524** +-------+-------+---+---+---+---+
525** | op12/i/gco | ot | prev | (alternative fields in union) 525** | op12/i/gco32 | ot | prev | (alternative fields in union)
526** +-------+-------+---+---+---+---+
527** | TValue/gco64 | (2nd IR slot for 64 bit constants)
526** +---------------+-------+-------+ 528** +---------------+-------+-------+
527** 32 16 16 529** 32 16 16
528** 530**
@@ -550,8 +552,9 @@ typedef union IRIns {
550 ) 552 )
551 }; 553 };
552 int32_t i; /* 32 bit signed integer literal (overlaps op12). */ 554 int32_t i; /* 32 bit signed integer literal (overlaps op12). */
553 GCRef gcr; /* GCobj constant (overlaps op12). */ 555 GCRef gcr; /* GCobj constant (overlaps op12 or entire slot). */
554 MRef ptr; /* Pointer constant (overlaps op12). */ 556 MRef ptr; /* Pointer constant (overlaps op12 or entire slot). */
557 TValue tv; /* TValue constant (overlaps entire slot). */
555} IRIns; 558} IRIns;
556 559
557/* TODO_GC64: major changes required. */ 560/* TODO_GC64: major changes required. */
@@ -560,10 +563,10 @@ typedef union IRIns {
560#define ir_ktab(ir) (gco2tab(ir_kgc((ir)))) 563#define ir_ktab(ir) (gco2tab(ir_kgc((ir))))
561#define ir_kfunc(ir) (gco2func(ir_kgc((ir)))) 564#define ir_kfunc(ir) (gco2func(ir_kgc((ir))))
562#define ir_kcdata(ir) (gco2cd(ir_kgc((ir)))) 565#define ir_kcdata(ir) (gco2cd(ir_kgc((ir))))
563#define ir_knum(ir) check_exp((ir)->o == IR_KNUM, mref((ir)->ptr, cTValue)) 566#define ir_knum(ir) check_exp((ir)->o == IR_KNUM, &(ir)[1].tv)
564#define ir_kint64(ir) check_exp((ir)->o == IR_KINT64, mref((ir)->ptr,cTValue)) 567#define ir_kint64(ir) check_exp((ir)->o == IR_KINT64, &(ir)[1].tv)
565#define ir_k64(ir) \ 568#define ir_k64(ir) \
566 check_exp((ir)->o == IR_KNUM || (ir)->o == IR_KINT64, mref((ir)->ptr,cTValue)) 569 check_exp((ir)->o == IR_KNUM || (ir)->o == IR_KINT64, &(ir)[1].tv)
567#define ir_kptr(ir) \ 570#define ir_kptr(ir) \
568 check_exp((ir)->o == IR_KPTR || (ir)->o == IR_KKPTR, mref((ir)->ptr, void)) 571 check_exp((ir)->o == IR_KPTR || (ir)->o == IR_KKPTR, mref((ir)->ptr, void))
569 572