diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-07-20 13:33:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 13:33:29 -0700 |
commit | da680fdbcb7eaad1c692369c7c826fc02b00c877 (patch) | |
tree | 28826407cb8432c53a436381249c70dbaee4a2f6 /test/unit.fromasm.no-opts | |
parent | 9ff9885b5d5d3415bb83a88967709e0c941be16e (diff) | |
download | binaryen-da680fdbcb7eaad1c692369c7c826fc02b00c877.tar.gz binaryen-da680fdbcb7eaad1c692369c7c826fc02b00c877.tar.bz2 binaryen-da680fdbcb7eaad1c692369c7c826fc02b00c877.zip |
fix f32 frem in asm2wasm #1105 (#1106)
Diffstat (limited to 'test/unit.fromasm.no-opts')
-rw-r--r-- | test/unit.fromasm.no-opts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 878011cef..511e310a3 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -40,6 +40,7 @@ (export "conversions" (func $conversions)) (export "switcher" (func $switcher)) (export "frem" (func $frem)) + (export "frem_float" (func $legalstub$frem_float)) (export "big_uint_div_u" (func $big_uint_div_u)) (export "fr" (func $legalstub$fr)) (export "negZero" (func $negZero)) @@ -383,6 +384,20 @@ ) ) ) + (func $frem_float (result f32) + (return + (f32.demote/f64 + (call $f64-rem + (f64.promote/f32 + (f32.const 5.5) + ) + (f64.promote/f32 + (f32.const 1.2000000476837158) + ) + ) + ) + ) + ) (func $i32u-div (param $0 i32) (param $1 i32) (result i32) (if (result i32) (i32.eqz @@ -2006,6 +2021,11 @@ (get_local $x) ) ) + (func $legalstub$frem_float (result f64) + (f64.promote/f32 + (call $frem_float) + ) + ) (func $legalstub$fr (param $0 f64) (call $fr (f32.demote/f64 |