diff options
author | Mike Pall <mike> | 2013-05-24 00:45:44 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-05-24 00:49:02 +0200 |
commit | f1f7e403182c891a356ce8813417820af19a778b (patch) | |
tree | e992da894d0e7fb21cffb2948ad04ffc38cd158c /src/lj_asm.c | |
parent | b3369f3c95a11a8c451b244a2da69f1c3aee31c4 (diff) | |
download | luajit-f1f7e403182c891a356ce8813417820af19a778b.tar.gz luajit-f1f7e403182c891a356ce8813417820af19a778b.tar.bz2 luajit-f1f7e403182c891a356ce8813417820af19a778b.zip |
FFI: Compile VLA/VLS and large cdata allocs with default initialization.
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r-- | src/lj_asm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 7542c77c..a80d6adf 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -2050,7 +2050,16 @@ static void asm_setup_regsp(ASMState *as) | |||
2050 | case IR_SNEW: case IR_XSNEW: case IR_NEWREF: case IR_BUFPUT: | 2050 | case IR_SNEW: case IR_XSNEW: case IR_NEWREF: case IR_BUFPUT: |
2051 | if (REGARG_NUMGPR < 3 && as->evenspill < 3) | 2051 | if (REGARG_NUMGPR < 3 && as->evenspill < 3) |
2052 | as->evenspill = 3; /* lj_str_new and lj_tab_newkey need 3 args. */ | 2052 | as->evenspill = 3; /* lj_str_new and lj_tab_newkey need 3 args. */ |
2053 | case IR_TNEW: case IR_TDUP: case IR_CNEW: case IR_CNEWI: case IR_TOSTR: | 2053 | #if LJ_TARGET_X86 && LJ_HASFFI |
2054 | if (0) { | ||
2055 | case IR_CNEW: | ||
2056 | if (ir->op2 != REF_NIL && as->evenspill < 4) | ||
2057 | as->evenspill = 4; /* lj_cdata_newv needs 4 args. */ | ||
2058 | } | ||
2059 | #else | ||
2060 | case IR_CNEW: | ||
2061 | #endif | ||
2062 | case IR_TNEW: case IR_TDUP: case IR_CNEWI: case IR_TOSTR: | ||
2054 | case IR_BUFSTR: | 2063 | case IR_BUFSTR: |
2055 | ir->prev = REGSP_HINT(RID_RET); | 2064 | ir->prev = REGSP_HINT(RID_RET); |
2056 | if (inloop) | 2065 | if (inloop) |