diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-01 10:01:16 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-01 10:01:16 -0700 |
commit | 18c03af5f0ee66eb0d75ba3892cd31c72ea6d5c2 (patch) | |
tree | 499f1d85ab2a8431a1137cecb8f8fb82d4d41f7c /src/analyzer.js | |
parent | 48ae14de71a389f29fdb6542e04e1c805788f5bb (diff) | |
parent | cb42d258c2ca1035cac73e7635992d997f9df735 (diff) |
Merge branch 'newtriple' into incoming
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 7fbdf24d..03d44cb7 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -469,6 +469,23 @@ function analyzer(data, sidePass) { i++; continue; // special case, handled in makeComparison } + case 'va_arg': { + assert(value.type == 'i64'); + assert(value.value.type == 'i32*', value.value.type); + i += removeAndAdd(label.lines, i, range(2).map(function(x) { + return { + intertype: 'va_arg', + assignTo: value.assignTo + '$' + x, + type: 'i32', + value: { + intertype: 'value', + ident: value.value.ident, // We read twice from the same i32* var, incrementing // + '$' + x, + type: 'i32*' + } + }; + })); + continue; + } case 'extractvalue': { // XXX we assume 32-bit alignment in extractvalue/insertvalue, // but in theory they can run on packed structs too (see use getStructuralTypePartBits) // potentially legalize the actual extracted value too if it is >32 bits, not just the extraction in general @@ -1492,7 +1509,7 @@ function analyzer(data, sidePass) { calcAllocatedSize(item.allocatedType)*item.allocatedNum: 0; if (USE_TYPED_ARRAYS === 2) { // We need to keep the stack aligned - item.allocatedSize = Runtime.forceAlign(item.allocatedSize, QUANTUM_SIZE); + item.allocatedSize = Runtime.forceAlign(item.allocatedSize, Runtime.STACK_ALIGN); } } var index = 0; |