summaryrefslogtreecommitdiff
path: root/src/lj_asm_x86.h
diff options
context:
space:
mode:
authorMike Pall <mike>2011-10-24 16:14:01 +0200
committerMike Pall <mike>2011-10-24 16:14:01 +0200
commit32098921fda08aad6d67efff20d2e1b31b92fa63 (patch)
tree12807c4d8b37d5d60db02096b483df1b01425ede /src/lj_asm_x86.h
parentcb1dd159e3b25e23cb8aa2ba9b6da76bb17398ec (diff)
downloadluajit2-32098921fda08aad6d67efff20d2e1b31b92fa63.tar.gz
Fix handling of alignment arguments (nil) to CALLX.
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r--src/lj_asm_x86.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index 6767e0c7..2edfe6e6 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -2618,7 +2618,7 @@ static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci)
uint32_t i;
int ngpr = 6, nfpr = 8;
for (i = 0; i < nargs; i++)
- if (irt_isfp(IR(args[i])->t)) {
+ if (args[i] && irt_isfp(IR(args[i])->t)) {
if (nfpr > 0) nfpr--; else nslots += 2;
} else {
if (ngpr > 0) ngpr--; else nslots += 2;
@@ -2633,7 +2633,7 @@ static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci)
} else {
uint32_t i;
for (i = 0; i < nargs; i++)
- nslots += irt_isnum(IR(args[i])->t) ? 2 : 1;
+ nslots += (args[i] && irt_isnum(IR(args[i])->t)) ? 2 : 1;
if (nslots > as->evenspill) /* Leave room for args. */
as->evenspill = nslots;
}