diff options
author | Dan Gohman <sunfish@google.com> | 2014-02-20 17:24:22 -0800 |
---|---|---|
committer | Dan Gohman <sunfish@google.com> | 2014-02-25 11:58:52 -0800 |
commit | 264a5a91c450b510bcee1d257372ee5d9750879b (patch) | |
tree | 4f6f79a60d1b20d5f81bdae873b548cc55644a59 /src/library.js | |
parent | e6f7d1edbe66e4ee676413de57a96222add7a3fd (diff) |
Introduce the asmjs-unknown-emscripten target triple.
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/library.js b/src/library.js index 5df5ff20..18a794fd 100644 --- a/src/library.js +++ b/src/library.js @@ -1861,14 +1861,14 @@ LibraryManager.library = { // int x = 4; printf("%c\n", (char)x); var ret; if (type === 'double') { -#if TARGET_LE32 == 2 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 2 ret = {{{ makeGetValue('varargs', 'argIndex', 'double', undefined, undefined, true, 4) }}}; #else ret = {{{ makeGetValue('varargs', 'argIndex', 'double', undefined, undefined, true) }}}; #endif #if USE_TYPED_ARRAYS == 2 } else if (type == 'i64') { -#if TARGET_LE32 == 1 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 1 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 @@ -1885,7 +1885,7 @@ LibraryManager.library = { type = 'i32'; // varargs are always i32, i64, or double ret = {{{ makeGetValue('varargs', 'argIndex', 'i32', undefined, undefined, true) }}}; } -#if TARGET_LE32 == 2 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 2 argIndex += Runtime.getNativeFieldSize(type); #else argIndex += Math.max(Runtime.getNativeFieldSize(type), Runtime.getAlignSize(type, null, true)); @@ -2859,7 +2859,7 @@ LibraryManager.library = { vsscanf: 'sscanf', #endif -#if TARGET_LE32 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN // convert va_arg into varargs vfprintf__deps: ['fprintf'], vfprintf: function(s, f, va_arg) { @@ -4178,7 +4178,7 @@ LibraryManager.library = { #if TARGET_X86 return makeSetValue(ptr, 0, 'varrp', 'void*'); #endif -#if TARGET_LE32 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN // 2-word structure: struct { void* start; void* currentOffset; } return makeSetValue(ptr, 0, 'varrp', 'void*') + ';' + makeSetValue(ptr, Runtime.QUANTUM_SIZE, 0, 'void*'); #endif |