Refactor CCallInfo representation for split arguments.

This commit is contained in:
Mike Pall
2013-05-13 19:49:46 +02:00
parent 23e47f2913
commit acda75ad2c
6 changed files with 74 additions and 59 deletions

View File

@@ -226,7 +226,7 @@ static void asm_fusexref(ASMState *as, MIPSIns mi, Reg rt, IRRef ref,
/* Generate a call to a C function. */
static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args)
{
uint32_t n, nargs = CCI_NARGS(ci);
uint32_t n, nargs = CCI_XNARGS(ci);
int32_t ofs = 16;
Reg gpr, fpr = REGARG_FIRSTFPR;
if ((void *)ci->func)
@@ -1726,7 +1726,7 @@ static void asm_tail_prep(ASMState *as)
static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci)
{
IRRef args[CCI_NARGS_MAX];
uint32_t i, nargs = (int)CCI_NARGS(ci);
uint32_t i, nargs = CCI_XNARGS(ci);
int nslots = 4, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR;
asm_collectargs(as, ir, ci, args);
for (i = 0; i < nargs; i++) {