aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jsifier.js1
-rw-r--r--src/library.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 2715ae3e..1cb6308d 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1366,6 +1366,7 @@ function JSify(data, functionsOnly, givenFunctions) {
} else {
size = Runtime.getNativeFieldSize(param.type);
}
+ size = Runtime.alignMemory(size, Runtime.STACK_ALIGN);
varargs.push(val);
varargs = varargs.concat(zeros(size-1));
// TODO: replace concats like this with push
diff --git a/src/library.js b/src/library.js
index f9ff18ec..ae997a71 100644
--- a/src/library.js
+++ b/src/library.js
@@ -2679,7 +2679,7 @@ LibraryManager.library = {
type = 'i32'; // varargs are always i32, i64, or double
ret = {{{ makeGetValue('varargs', 'argIndex', 'i32', undefined, undefined, true) }}};
}
- argIndex += Runtime.getAlignSize(type);
+ argIndex += {{{ STACK_ALIGN }}};
return ret;
}