diff options
author | Max Graey <maxgraey@gmail.com> | 2020-11-10 23:04:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 13:04:16 -0800 |
commit | 236296d8563e0f90c3b57f32f1f8f63bac414b89 (patch) | |
tree | 56aaabeedd5d02229d20622d4214fba8f63e6f7f /src/passes/wasm-intrinsics.wat | |
parent | 0c20d9f427b63a6fdc354bb917c11f382068eaec (diff) | |
download | binaryen-236296d8563e0f90c3b57f32f1f8f63bac414b89.tar.gz binaryen-236296d8563e0f90c3b57f32f1f8f63bac414b89.tar.bz2 binaryen-236296d8563e0f90c3b57f32f1f8f63bac414b89.zip |
[wasm2js] Use native JavaScript Math.trunc (#3329)
Diffstat (limited to 'src/passes/wasm-intrinsics.wat')
-rw-r--r-- | src/passes/wasm-intrinsics.wat | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/passes/wasm-intrinsics.wat b/src/passes/wasm-intrinsics.wat index 17bf0d649..185bef961 100644 --- a/src/passes/wasm-intrinsics.wat +++ b/src/passes/wasm-intrinsics.wat @@ -26,8 +26,6 @@ (export "__wasm_i64_srem" (func $__wasm_i64_srem)) (export "__wasm_i64_urem" (func $__wasm_i64_urem)) (export "__wasm_i64_mul" (func $__wasm_i64_mul)) - (export "__wasm_trunc_f32" (func $__wasm_trunc_f32)) - (export "__wasm_trunc_f64" (func $__wasm_trunc_f64)) (export "__wasm_ctz_i32" (func $__wasm_ctz_i32)) (export "__wasm_ctz_i64" (func $__wasm_ctz_i64)) (export "__wasm_rotl_i32" (func $__wasm_rotl_i32)) @@ -144,38 +142,6 @@ (local.get $var$1) ) ) - ;; lowering of the f32.trunc instruction, rounds to the nearest integer, - ;; towards zero - (func $__wasm_trunc_f32 (; 5 ;) (type $1) (param $var$0 f32) (result f32) - (select - (f32.ceil - (local.get $var$0) - ) - (f32.floor - (local.get $var$0) - ) - (f32.lt - (local.get $var$0) - (f32.const 0) - ) - ) - ) - ;; lowering of the f64.trunc instruction, rounds to the nearest integer, - ;; towards zero - (func $__wasm_trunc_f64 (; 6 ;) (type $2) (param $var$0 f64) (result f64) - (select - (f64.ceil - (local.get $var$0) - ) - (f64.floor - (local.get $var$0) - ) - (f64.lt - (local.get $var$0) - (f64.const 0) - ) - ) - ) ;; lowering of the i32.ctz instruction, counting the number of zeros in $var$0 (func $__wasm_ctz_i32 (; 7 ;) (type $3) (param $var$0 i32) (result i32) (if |