aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/analyzer.js2
-rw-r--r--src/parseTools.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index cd7f6fea..4922a2f5 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -331,7 +331,7 @@ function analyzer(data, sidePass) {
intertype: 'value',
assignTo: element.ident,
type: element.bits,
- ident: 'tempRet' + (j++)
+ ident: 'tempRet' + (j++ - 1)
});
assert(j<10); // TODO: dynamically create more than 10 tempRet-s
}
diff --git a/src/parseTools.js b/src/parseTools.js
index 70692ac3..49740c6d 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1556,7 +1556,7 @@ function makeLLVMStruct(values) {
}
function makeStructuralReturn(values) {
- var i = 1;
+ var i = 0;
return 'return (' + values.slice(1).map(function(value) {
return 'tempRet' + (i++) + ' = ' + value;
}).concat([values[0]]).join(',') + ')';