aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm.c
diff options
context:
space:
mode:
authorMike Pall <mike>2011-01-19 00:40:03 +0100
committerMike Pall <mike>2011-01-19 00:40:03 +0100
commit925050fe3ffae269f77757679270432dbad7f010 (patch)
treeb332535f323ca99d7ee9d5b99c73f15de09ea43b /src/lj_asm.c
parent685dfc317270642fbf2a686799ca2b31ea42e0de (diff)
downloadluajit-925050fe3ffae269f77757679270432dbad7f010.tar.gz
luajit-925050fe3ffae269f77757679270432dbad7f010.tar.bz2
luajit-925050fe3ffae269f77757679270432dbad7f010.zip
Differentiate between IR_KPTR and IR_KKPTR.
IR_KPTR holds a const pointer to possibly non-const content. IR_KKPTR holds a const pointer to definitely const content. Note that only content known by the VM to be const qualifies. Content tagged as const by users (e.g. const char *) doesn't.
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r--src/lj_asm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index db126d74..bda86fc4 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -636,7 +636,7 @@ static Reg ra_rematk(ASMState *as, IRIns *ir)
636#endif 636#endif
637 } else { 637 } else {
638 lua_assert(ir->o == IR_KINT || ir->o == IR_KGC || 638 lua_assert(ir->o == IR_KINT || ir->o == IR_KGC ||
639 ir->o == IR_KPTR || ir->o == IR_KNULL); 639 ir->o == IR_KPTR || ir->o == IR_KKPTR || ir->o == IR_KNULL);
640 emit_loadi(as, r, ir->i); 640 emit_loadi(as, r, ir->i);
641 } 641 }
642 return r; 642 return r;
@@ -946,7 +946,7 @@ static void ra_left(ASMState *as, Reg dest, IRRef lref)
946#endif 946#endif
947 } else { 947 } else {
948 lua_assert(ir->o == IR_KINT || ir->o == IR_KGC || 948 lua_assert(ir->o == IR_KINT || ir->o == IR_KGC ||
949 ir->o == IR_KPTR || ir->o == IR_KNULL); 949 ir->o == IR_KPTR || ir->o == IR_KKPTR || ir->o == IR_KNULL);
950 emit_loadi(as, dest, ir->i); 950 emit_loadi(as, dest, ir->i);
951 return; 951 return;
952 } 952 }
@@ -1312,7 +1312,7 @@ static void asm_fusexref(ASMState *as, IRRef ref, RegSet allow)
1312{ 1312{
1313 IRIns *ir = IR(ref); 1313 IRIns *ir = IR(ref);
1314 as->mrm.idx = RID_NONE; 1314 as->mrm.idx = RID_NONE;
1315 if (ir->o == IR_KPTR) { 1315 if (ir->o == IR_KPTR || ir->o == IR_KKPTR) {
1316 as->mrm.ofs = ir->i; 1316 as->mrm.ofs = ir->i;
1317 as->mrm.base = RID_NONE; 1317 as->mrm.base = RID_NONE;
1318 } else if (ir->o == IR_STRREF) { 1318 } else if (ir->o == IR_STRREF) {