const CCallInfo *ci, IRRef *args)
{
uint32_t n = CCI_NARGS(ci);
- lua_assert(n <= CCI_NARGS_MAX);
+ lua_assert(n <= CCI_NARGS_MAX*2); /* Account for split args. */
if ((ci->flags & CCI_L)) { *args++ = ASMREF_L; n--; }
while (n-- > 1) {
ir = IR(ir->op1);
static void asm_callx(ASMState *as, IRIns *ir)
{
- IRRef args[CCI_NARGS_MAX];
+ IRRef args[CCI_NARGS_MAX*2];
CCallInfo ci;
IRRef func;
IRIns *irf;
/* Ensure there are enough stack slots for call arguments. */
static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci)
{
- IRRef args[CCI_NARGS_MAX];
+ IRRef args[CCI_NARGS_MAX*2];
uint32_t i, nargs = (int)CCI_NARGS(ci);
int nslots = 0, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR, fprodd = 0;
asm_collectargs(as, ir, ci, args);
static void asm_callx(ASMState *as, IRIns *ir)
{
- IRRef args[CCI_NARGS_MAX];
+ IRRef args[CCI_NARGS_MAX*2];
CCallInfo ci;
IRRef func;
IRIns *irf;
/* Ensure there are enough stack slots for call arguments. */
static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci)
{
- IRRef args[CCI_NARGS_MAX];
+ IRRef args[CCI_NARGS_MAX*2];
uint32_t i, nargs = (int)CCI_NARGS(ci);
int nslots = 4, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR;
asm_collectargs(as, ir, ci, args);
static void asm_callx(ASMState *as, IRIns *ir)
{
- IRRef args[CCI_NARGS_MAX];
+ IRRef args[CCI_NARGS_MAX*2];
CCallInfo ci;
IRRef func;
IRIns *irf;
/* Ensure there are enough stack slots for call arguments. */
static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci)
{
- IRRef args[CCI_NARGS_MAX];
+ IRRef args[CCI_NARGS_MAX*2];
uint32_t i, nargs = (int)CCI_NARGS(ci);
int nslots = 2, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR;
asm_collectargs(as, ir, ci, args);
static void asm_callx(ASMState *as, IRIns *ir)
{
- IRRef args[CCI_NARGS_MAX];
+ IRRef args[CCI_NARGS_MAX*2];
CCallInfo ci;
IRRef func;
IRIns *irf;
/* Ensure there are enough stack slots for call arguments. */
static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci)
{
- IRRef args[CCI_NARGS_MAX];
+ IRRef args[CCI_NARGS_MAX*2];
int nslots;
asm_collectargs(as, ir, ci, args);
nslots = asm_count_call_slots(as, ci, args);