diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-28 13:36:47 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-28 13:36:47 -0800 |
commit | 96713d72568b16d6789b58acce336090f2e9ed4d (patch) | |
tree | f3e6b5c49f74423cf609e20dfac661e2628d3180 /src | |
parent | bd05a50c6fad6a9ac639755706d2b2edd4d91ad6 (diff) |
fix fastcomp vararg alignment, only 4-byte
Diffstat (limited to 'src')
-rw-r--r-- | src/runtime.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime.js b/src/runtime.js index dedaf5ea..8ba5d08d 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -185,8 +185,11 @@ var Runtime = { // type can be a native type or a struct (or null, for structs we only look at size here) getAlignSize: function(type, size, vararg) { // we align i64s and doubles on 64-bit boundaries, unlike x86 +#if TARGET_LE32 == 1 + if (vararg) return 8; +#endif #if TARGET_LE32 - if (type == 'i64' || type == 'double' || vararg) return 8; + if (!vararg && (type == 'i64' || type == 'double')) return 8; if (!type) return Math.min(size, 8); // align structures internally to 64 bits #endif return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE); |