diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-27 18:25:42 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-29 13:02:32 -0700 |
commit | 466437a416eca47d432ec0004e11f4692b1d5bda (patch) | |
tree | c3681a9264ba41cb43becb7ce471dafb2789b126 /src | |
parent | 0b6a6613bc43768668fe50fd94074382c3652efa (diff) |
read 32-bit chunks of 64-bit varargs in the 64-bit blocks they are in
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js index ae997a71..28724c0c 100644 --- a/src/library.js +++ b/src/library.js @@ -2669,8 +2669,16 @@ LibraryManager.library = { ret = {{{ makeGetValue('varargs', 'argIndex', 'double', undefined, undefined, true) }}}; #if USE_TYPED_ARRAYS == 2 } else if (type == 'i64') { + +#if TARGET_LE32 + ret = [{{{ makeGetValue('varargs', 'argIndex', 'i32', undefined, undefined, true) }}}, + {{{ makeGetValue('varargs', 'argIndex+8', 'i32', undefined, undefined, true) }}}]; + argIndex += {{{ STACK_ALIGN }}}; // each 32-bit chunk is in a 64-bit block +#else ret = [{{{ makeGetValue('varargs', 'argIndex', 'i32', undefined, undefined, true) }}}, {{{ makeGetValue('varargs', 'argIndex+4', 'i32', undefined, undefined, true) }}}]; +#endif + #else } else if (type == 'i64') { ret = {{{ makeGetValue('varargs', 'argIndex', 'i64', undefined, undefined, true) }}}; |