diff options
Diffstat (limited to 'test/wasm2asm/float-ops.2asm.js')
-rw-r--r-- | test/wasm2asm/float-ops.2asm.js | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/test/wasm2asm/float-ops.2asm.js b/test/wasm2asm/float-ops.2asm.js index e2dd5d528..fceaa7985 100644 --- a/test/wasm2asm/float-ops.2asm.js +++ b/test/wasm2asm/float-ops.2asm.js @@ -14,6 +14,9 @@ function asmFunc(global, env, buffer) { var Math_clz32 = global.Math.clz32; var Math_min = global.Math.min; var Math_max = global.Math.max; + var Math_floor = global.Math.floor; + var Math_ceil = global.Math.ceil; + var Math_sqrt = global.Math.sqrt; var i64toi32_i32$HIGH_BITS = 0; function dummy() { @@ -173,6 +176,36 @@ function asmFunc(global, env, buffer) { return Math_fround(Math_fround($0)); } + function $27($0) { + $0 = Math_fround($0); + return Math_fround(Math_fround(Math_floor($0))); + } + + function $28($0) { + $0 = Math_fround($0); + return Math_fround(Math_fround(Math_ceil($0))); + } + + function $29($0) { + $0 = +$0; + return +Math_floor($0); + } + + function $30($0) { + $0 = +$0; + return +Math_ceil($0); + } + + function $31($0) { + $0 = Math_fround($0); + return Math_fround(Math_fround(Math_sqrt($0))); + } + + function $32($0) { + $0 = +$0; + return +Math_sqrt($0); + } + function __wasm_ctz_i32(x) { x = x | 0; var $1 = 0; @@ -235,7 +268,13 @@ function asmFunc(global, env, buffer) { f64_min: $23, f64_max: $24, f64_promote: $25, - f32_demote: $26 + f32_demote: $26, + f32_floor: $27, + f32_ceil: $28, + f64_floor: $29, + f64_ceil: $30, + f32_sqrt: $31, + f64_sqrt: $32 }; } |