aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index a2ed7f92..acb0332b 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1296,7 +1296,12 @@ function JSify(data, functionsOnly, givenFunctions) {
}
});
makeFuncLineActor('va_arg', function(item) {
- return makeGetValue(item.value.ident, 0, item.type);
+ assert(TARGET_LE32);
+ var ident = item.value.ident;
+ var move = Runtime.getNativeTypeSize(item.type);
+ return '(tempInt=' + makeGetValue(ident, 4, '*') + ',' +
+ makeSetValue(ident, 4, 'tempInt + ' + move, '*') + ',' +
+ makeGetValue(makeGetValue(ident, 0, '*'), 'tempInt', item.type) + ')';
});
makeFuncLineActor('mathop', processMathop);