diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-08 12:14:15 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-08 12:14:15 -0800 |
commit | 6f0ff33511e674c10dabd45c48e1e85d90981dd8 (patch) | |
tree | 4b3a1925483e013b50befbcd42ce40356592ff31 /src/parseTools.js | |
parent | d3f0585b4735fa4fe39cf8837920ab84f563ca8b (diff) |
improve legalize testcase with a phi
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 29b8bdbf..3cc17cc4 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -966,13 +966,11 @@ function makeSetValue(ptr, pos, value, type, noNeedFirst, ignore, align, noSafe, makeSetValue(ptr, getFastValue(pos, '+', Runtime.getNativeTypeSize('i32')), 'tempDoubleI32[1]', 'i32', noNeedFirst, ignore, align, noSafe, ',') + ')'; } - if (!align && isIntImplemented(type) && !isPowerOfTwo(getBits(type))) { - align = 1; // we need to split this up, as if alignment were 1, this is an unnatural type like i24 - } - if (USE_TYPED_ARRAYS == 2 && align) { + var needSplitting = isIntImplemented(type) && !isPowerOfTwo(getBits(type)); // an unnatural type like i24 + if (USE_TYPED_ARRAYS == 2 && (align || needSplitting)) { // Alignment is important here, or we need to split this up for other reasons. var bytes = Runtime.getNativeTypeSize(type); - if (bytes > align) { + if (bytes > align || needSplitting) { var ret = ''; if (isIntImplemented(type)) { if (bytes == 4 && align == 2) { |