diff options
author | Mike Pall <mike> | 2013-05-16 19:59:38 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-05-16 19:59:38 +0200 |
commit | 0f79d4741f29637de1eaaa603fdd0d161feb390d (patch) | |
tree | ebb52a50d4371fbde02dd9511c8fd6da2564e05c /src | |
parent | 1c7650f782c4e6482cf496699af9136c89fe22b2 (diff) | |
download | luajit-0f79d4741f29637de1eaaa603fdd0d161feb390d.tar.gz luajit-0f79d4741f29637de1eaaa603fdd0d161feb390d.tar.bz2 luajit-0f79d4741f29637de1eaaa603fdd0d161feb390d.zip |
Handle calls with max. args in backends even after SPLIT.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_asm.c | 2 | ||||
-rw-r--r-- | src/lj_asm_arm.h | 4 | ||||
-rw-r--r-- | src/lj_asm_mips.h | 4 | ||||
-rw-r--r-- | src/lj_asm_ppc.h | 4 | ||||
-rw-r--r-- | src/lj_asm_x86.h | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 038f4d1c..316e81d6 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -948,7 +948,7 @@ static void asm_collectargs(ASMState *as, IRIns *ir, | |||
948 | const CCallInfo *ci, IRRef *args) | 948 | const CCallInfo *ci, IRRef *args) |
949 | { | 949 | { |
950 | uint32_t n = CCI_NARGS(ci); | 950 | uint32_t n = CCI_NARGS(ci); |
951 | lua_assert(n <= CCI_NARGS_MAX); | 951 | lua_assert(n <= CCI_NARGS_MAX*2); /* Account for split args. */ |
952 | if ((ci->flags & CCI_L)) { *args++ = ASMREF_L; n--; } | 952 | if ((ci->flags & CCI_L)) { *args++ = ASMREF_L; n--; } |
953 | while (n-- > 1) { | 953 | while (n-- > 1) { |
954 | ir = IR(ir->op1); | 954 | ir = IR(ir->op1); |
diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h index 7c5f7188..a66573c0 100644 --- a/src/lj_asm_arm.h +++ b/src/lj_asm_arm.h | |||
@@ -464,7 +464,7 @@ static void asm_call(ASMState *as, IRIns *ir) | |||
464 | 464 | ||
465 | static void asm_callx(ASMState *as, IRIns *ir) | 465 | static void asm_callx(ASMState *as, IRIns *ir) |
466 | { | 466 | { |
467 | IRRef args[CCI_NARGS_MAX]; | 467 | IRRef args[CCI_NARGS_MAX*2]; |
468 | CCallInfo ci; | 468 | CCallInfo ci; |
469 | IRRef func; | 469 | IRRef func; |
470 | IRIns *irf; | 470 | IRIns *irf; |
@@ -2295,7 +2295,7 @@ static void asm_ir(ASMState *as, IRIns *ir) | |||
2295 | /* Ensure there are enough stack slots for call arguments. */ | 2295 | /* Ensure there are enough stack slots for call arguments. */ |
2296 | static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) | 2296 | static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) |
2297 | { | 2297 | { |
2298 | IRRef args[CCI_NARGS_MAX]; | 2298 | IRRef args[CCI_NARGS_MAX*2]; |
2299 | uint32_t i, nargs = (int)CCI_NARGS(ci); | 2299 | uint32_t i, nargs = (int)CCI_NARGS(ci); |
2300 | int nslots = 0, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR, fprodd = 0; | 2300 | int nslots = 0, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR, fprodd = 0; |
2301 | asm_collectargs(as, ir, ci, args); | 2301 | asm_collectargs(as, ir, ci, args); |
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h index 7d1a8c68..9fe7c9c3 100644 --- a/src/lj_asm_mips.h +++ b/src/lj_asm_mips.h | |||
@@ -337,7 +337,7 @@ static void asm_call(ASMState *as, IRIns *ir) | |||
337 | 337 | ||
338 | static void asm_callx(ASMState *as, IRIns *ir) | 338 | static void asm_callx(ASMState *as, IRIns *ir) |
339 | { | 339 | { |
340 | IRRef args[CCI_NARGS_MAX]; | 340 | IRRef args[CCI_NARGS_MAX*2]; |
341 | CCallInfo ci; | 341 | CCallInfo ci; |
342 | IRRef func; | 342 | IRRef func; |
343 | IRIns *irf; | 343 | IRIns *irf; |
@@ -1894,7 +1894,7 @@ static void asm_ir(ASMState *as, IRIns *ir) | |||
1894 | /* Ensure there are enough stack slots for call arguments. */ | 1894 | /* Ensure there are enough stack slots for call arguments. */ |
1895 | static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) | 1895 | static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) |
1896 | { | 1896 | { |
1897 | IRRef args[CCI_NARGS_MAX]; | 1897 | IRRef args[CCI_NARGS_MAX*2]; |
1898 | uint32_t i, nargs = (int)CCI_NARGS(ci); | 1898 | uint32_t i, nargs = (int)CCI_NARGS(ci); |
1899 | int nslots = 4, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR; | 1899 | int nslots = 4, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR; |
1900 | asm_collectargs(as, ir, ci, args); | 1900 | asm_collectargs(as, ir, ci, args); |
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h index 34bd721f..651fa318 100644 --- a/src/lj_asm_ppc.h +++ b/src/lj_asm_ppc.h | |||
@@ -340,7 +340,7 @@ static void asm_call(ASMState *as, IRIns *ir) | |||
340 | 340 | ||
341 | static void asm_callx(ASMState *as, IRIns *ir) | 341 | static void asm_callx(ASMState *as, IRIns *ir) |
342 | { | 342 | { |
343 | IRRef args[CCI_NARGS_MAX]; | 343 | IRRef args[CCI_NARGS_MAX*2]; |
344 | CCallInfo ci; | 344 | CCallInfo ci; |
345 | IRRef func; | 345 | IRRef func; |
346 | IRIns *irf; | 346 | IRIns *irf; |
@@ -2092,7 +2092,7 @@ static void asm_ir(ASMState *as, IRIns *ir) | |||
2092 | /* Ensure there are enough stack slots for call arguments. */ | 2092 | /* Ensure there are enough stack slots for call arguments. */ |
2093 | static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) | 2093 | static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) |
2094 | { | 2094 | { |
2095 | IRRef args[CCI_NARGS_MAX]; | 2095 | IRRef args[CCI_NARGS_MAX*2]; |
2096 | uint32_t i, nargs = (int)CCI_NARGS(ci); | 2096 | uint32_t i, nargs = (int)CCI_NARGS(ci); |
2097 | int nslots = 2, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR; | 2097 | int nslots = 2, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR; |
2098 | asm_collectargs(as, ir, ci, args); | 2098 | asm_collectargs(as, ir, ci, args); |
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index 8bae1789..64441ccb 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h | |||
@@ -609,7 +609,7 @@ static void *asm_callx_func(ASMState *as, IRIns *irf, IRRef func) | |||
609 | 609 | ||
610 | static void asm_callx(ASMState *as, IRIns *ir) | 610 | static void asm_callx(ASMState *as, IRIns *ir) |
611 | { | 611 | { |
612 | IRRef args[CCI_NARGS_MAX]; | 612 | IRRef args[CCI_NARGS_MAX*2]; |
613 | CCallInfo ci; | 613 | CCallInfo ci; |
614 | IRRef func; | 614 | IRRef func; |
615 | IRIns *irf; | 615 | IRIns *irf; |
@@ -2742,7 +2742,7 @@ static void asm_ir(ASMState *as, IRIns *ir) | |||
2742 | /* Ensure there are enough stack slots for call arguments. */ | 2742 | /* Ensure there are enough stack slots for call arguments. */ |
2743 | static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) | 2743 | static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) |
2744 | { | 2744 | { |
2745 | IRRef args[CCI_NARGS_MAX]; | 2745 | IRRef args[CCI_NARGS_MAX*2]; |
2746 | int nslots; | 2746 | int nslots; |
2747 | asm_collectargs(as, ir, ci, args); | 2747 | asm_collectargs(as, ir, ci, args); |
2748 | nslots = asm_count_call_slots(as, ci, args); | 2748 | nslots = asm_count_call_slots(as, ci, args); |