diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-11-14 16:42:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-14 16:42:25 -0800 |
commit | 4deed1eb310993391fa0e7e06a18cf2303674f98 (patch) | |
tree | 16028717e26ec439fe0e8f5b2e40988fcc92f2e9 /test/threads.wasm-only.fromasm.no-opts | |
parent | 82d693b2bd23778b29bbd1019936a2857580c7ed (diff) | |
download | binaryen-4deed1eb310993391fa0e7e06a18cf2303674f98.tar.gz binaryen-4deed1eb310993391fa0e7e06a18cf2303674f98.tar.bz2 binaryen-4deed1eb310993391fa0e7e06a18cf2303674f98.zip |
add i64_atomics_* support to asm2wasm (#1262)
* add i64_atomics_* support to asm2wasm
* OptimizeInstructions: atomic loads can't be signed
Diffstat (limited to 'test/threads.wasm-only.fromasm.no-opts')
-rw-r--r-- | test/threads.wasm-only.fromasm.no-opts | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/test/threads.wasm-only.fromasm.no-opts b/test/threads.wasm-only.fromasm.no-opts new file mode 100644 index 000000000..abaca2010 --- /dev/null +++ b/test/threads.wasm-only.fromasm.no-opts @@ -0,0 +1,90 @@ +(module + (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32)) + (import "env" "memory" (memory $0 (shared 256 256))) + (import "env" "table" (table 0 0 anyfunc)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) + (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) + (global $tempRet0 (mut i32) (i32.const 0)) + (export "test64" (func $legalstub$test64)) + (func $test64 (; 0 ;) (result i64) + (local $x i64) + (local $y i64) + (local $z i32) + (local $int32 i32) + (local $float32 f32) + (local $float64 f64) + (i64.atomic.store + (i32.const 4656) + (i64.const 92) + ) + (set_local $x + (i64.atomic.load + (i32.const 4656) + ) + ) + (set_local $y + (i64.atomic.rmw.add + (get_local $int32) + (i64.const 26) + ) + ) + (set_local $x + (i64.atomic.rmw.sub + (i32.const 1024) + (get_local $y) + ) + ) + (set_local $y + (i64.atomic.rmw.and + (i32.const 1024) + (get_local $x) + ) + ) + (set_local $x + (i64.atomic.rmw.or + (i32.const 1024) + (get_local $y) + ) + ) + (set_local $y + (i64.atomic.rmw.xor + (i32.const 1024) + (get_local $x) + ) + ) + (set_local $x + (i64.atomic.rmw.xchg + (i32.const 1024) + (get_local $y) + ) + ) + (set_local $y + (i64.atomic.rmw.cmpxchg + (i32.const 1024) + (get_local $x) + (get_local $y) + ) + ) + (return + (get_local $x) + ) + ) + (func $legalstub$test64 (; 1 ;) (result i32) + (local $0 i64) + (set_local $0 + (call $test64) + ) + (set_global $tempRet0 + (i32.wrap/i64 + (i64.shr_u + (get_local $0) + (i64.const 32) + ) + ) + ) + (i32.wrap/i64 + (get_local $0) + ) + ) +) |