diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-03-10 21:27:25 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-10 21:27:25 -0700 |
commit | 4c774c6d058e0648501c5a9f61ed7a254d9a2acf (patch) | |
tree | 31da52a7f27a951b0b73b3438d6ace6fdc2056b7 /src | |
parent | 6a91523540888fe343495090f9ee1acb659905f1 (diff) |
legalize truncs from legal values into illegal values
Diffstat (limited to 'src')
-rw-r--r-- | src/analyzer.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 209e3140..926ac9d3 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -231,9 +231,10 @@ function analyzer(data, sidePass) { } if (isIllegalType(item.valueType) || isIllegalType(item.type)) { isIllegal = true; - } - if ((item.intertype == 'load' || item.intertype == 'store') && isStructType(item.valueType)) { + } else if ((item.intertype == 'load' || item.intertype == 'store') && isStructType(item.valueType)) { isIllegal = true; // storing an entire structure is illegal + } else if (item.intertype == 'mathop' && item.op == 'trunc' && isIllegalType(item.params[1].ident)) { // trunc stores target value in second ident + isIllegal = true; } }); if (!isIllegal) { |