diff options
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 758d0b59..ece8fd53 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -186,13 +186,14 @@ function analyzer(data, sidePass) { }, lineNum: item.lineNum + (j/100) }); + var actualSizeType = 'i' + element.bits; // The last one may be smaller than 32 bits label.lines.splice(i+j*2+1, 0, { intertype: 'store', - valueType: 'i32', - value: { intertype: 'value', ident: element.ident, type: 'i32' }, - pointer: { intertype: 'value', ident: tempVar, type: 'i32' }, + valueType: actualSizeType, + value: { intertype: 'value', ident: element.ident, type: actualSizeType }, + pointer: { intertype: 'value', ident: tempVar, type: actualSizeType + '*' }, ident: tempVar, - pointerType: 'i32*', + pointerType: actualSizeType + '*', align: item.align, lineNum: item.lineNum + ((j+0.5)/100) }); |