]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
FFI/x64: Fix passing of vector arguments to calls.
authorMike Pall <mike>
Sun, 8 Sep 2013 11:11:02 +0000 (13:11 +0200)
committerMike Pall <mike>
Sun, 8 Sep 2013 11:11:02 +0000 (13:11 +0200)
src/lj_ccall.c

index eb73604f6ed8775bf77b7f3c0459e3ebef86b724..97dcc54672e356ee13caa6719d78c68fe585da3f 100644 (file)
 
 #define CCALL_HANDLE_REGARG \
   if (isfp) {  /* Try to pass argument in FPRs. */ \
-    if (nfpr + n <= CCALL_NARG_FPR) { \
+    int n2 = ctype_isvector(d->info) ? 1 : n; \
+    if (nfpr + n2 <= CCALL_NARG_FPR) { \
       dp = &cc->fpr[nfpr]; \
-      nfpr += n; \
+      nfpr += n2; \
       goto done; \
     } \
   } else {  /* Try to pass argument in GPRs. */ \