diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-14 11:31:56 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-14 11:31:56 -0700 |
commit | d18d12ccd38f7c3749ce8ead9daeef638df11212 (patch) | |
tree | 6018fa923e7a339fd8c0468f6f00528cc07e1c8b /emscripten.py | |
parent | 8bd76a3488ead4b0125e04e144a2f91e45124425 (diff) |
asmify ctlz/cttz
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/emscripten.py b/emscripten.py index bfcc3ea5..7d1d82f2 100755 --- a/emscripten.py +++ b/emscripten.py @@ -391,6 +391,13 @@ var i64Math_multiply = function(a, b, c, d) { i64Math.multiply(a, b, c, d) }; var i64Math_divide = function(a, b, c, d, e) { i64Math.divide(a, b, c, d, e) }; var i64Math_modulo = function(a, b, c, d, e) { i64Math.modulo(a, b, c, d, e) }; ''' + + if forwarded_json['Functions']['libraryFunctions'].get('llvm_cttz_i32') or \ + forwarded_json['Functions']['libraryFunctions'].get('llvm_ctlz_i32') or \ + forwarded_json['Functions']['libraryFunctions'].get('llvm_cttz_i64') or \ + forwarded_json['Functions']['libraryFunctions'].get('llvm_ctlz_i64'): + basic_vars += ['cttz_i8', 'ctlz_i8'] + asm_runtime_funcs = ['stackAlloc', 'stackSave', 'stackRestore', 'setThrew'] + ['setTempRet%d' % i for i in range(10)] # function tables def asm_coerce(value, sig): |