diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2020-09-18 15:50:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-18 15:50:25 -0700 |
commit | 3b4cb935f83c7fabacbf61146e56dabc0d65a441 (patch) | |
tree | 9aaac74aad59fe2ff2b00ac6e6a77bb808b01747 /test/passes/avoid-reinterprets64.txt | |
parent | 1a928bc3ff4b511e81b3f93db8aea872e88abaaf (diff) | |
download | binaryen-3b4cb935f83c7fabacbf61146e56dabc0d65a441.tar.gz binaryen-3b4cb935f83c7fabacbf61146e56dabc0d65a441.tar.bz2 binaryen-3b4cb935f83c7fabacbf61146e56dabc0d65a441.zip |
Initial implementation of "Memory64" proposal (#3130)
Also includes a lot of new spec tests that eventually need to go into the spec repo
Diffstat (limited to 'test/passes/avoid-reinterprets64.txt')
-rw-r--r-- | test/passes/avoid-reinterprets64.txt | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/test/passes/avoid-reinterprets64.txt b/test/passes/avoid-reinterprets64.txt new file mode 100644 index 000000000..1b6f05948 --- /dev/null +++ b/test/passes/avoid-reinterprets64.txt @@ -0,0 +1,182 @@ +(module + (type $none_=>_none (func)) + (type $none_=>_f32 (func (result f32))) + (memory $0 i64 1) + (func $simple + (drop + (f32.load + (i64.const 1024) + ) + ) + (drop + (i32.load + (i64.const 1024) + ) + ) + (drop + (f64.load + (i64.const 1024) + ) + ) + (drop + (i64.load + (i64.const 1024) + ) + ) + ) + (func $one + (local $x i32) + (local $1 i64) + (local $2 f32) + (local.set $x + (block (result i32) + (local.set $1 + (i64.const 1024) + ) + (local.set $2 + (f32.load + (local.get $1) + ) + ) + (i32.load + (local.get $1) + ) + ) + ) + (drop + (local.get $2) + ) + ) + (func $one-b + (local $x f32) + (local $1 i64) + (local $2 i32) + (local.set $x + (block (result f32) + (local.set $1 + (i64.const 1024) + ) + (local.set $2 + (i32.load + (local.get $1) + ) + ) + (f32.load + (local.get $1) + ) + ) + ) + (drop + (local.get $2) + ) + ) + (func $both + (local $x i32) + (local $1 i64) + (local $2 f32) + (local.set $x + (block (result i32) + (local.set $1 + (i64.const 1024) + ) + (local.set $2 + (f32.load + (local.get $1) + ) + ) + (i32.load + (local.get $1) + ) + ) + ) + (drop + (local.get $2) + ) + (drop + (local.get $2) + ) + ) + (func $half + (local $x i32) + (local $1 i64) + (local $2 f32) + (local.set $x + (block (result i32) + (local.set $1 + (i64.const 1024) + ) + (local.set $2 + (f32.load + (local.get $1) + ) + ) + (i32.load + (local.get $1) + ) + ) + ) + (drop + (local.get $x) + ) + (drop + (local.get $2) + ) + ) + (func $copy + (local $x i32) + (local $y i32) + (local $2 i64) + (local $3 f32) + (local.set $x + (block (result i32) + (local.set $2 + (i64.const 1024) + ) + (local.set $3 + (f32.load + (local.get $2) + ) + ) + (i32.load + (local.get $2) + ) + ) + ) + (local.set $y + (local.get $x) + ) + (drop + (local.get $3) + ) + ) + (func $partial1 (result f32) + (f32.reinterpret_i32 + (i32.load16_u + (i64.const 3) + ) + ) + ) + (func $partial2 (result f32) + (f32.reinterpret_i32 + (i32.load8_u + (i64.const 3) + ) + ) + ) + (func $nofallthrough + (local $x i32) + (local.set $x + (i32.load + (i64.const 1024) + ) + ) + (drop + (f32.reinterpret_i32 + (block $block (result i32) + (nop) + (local.get $x) + ) + ) + ) + ) +) |