-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jit: Threads: Add Fence, Wait, and Notify
Add a few test cases with non-zero offsets Signed-off-by: Máté Tokodi [email protected]
- Loading branch information
1 parent
01f5ac2
commit 5bafd6d
Showing
15 changed files
with
362 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
test/extended/threads/atomic_wait_notify_with_offsets.wast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
;; wait/notify with non-zero offsets | ||
(module | ||
(memory 1 1 shared) | ||
|
||
(func (export "initOffset") (param $value i64) (param $offset i32) (i64.store (local.get $offset) (local.get $value))) | ||
|
||
(func (export "memory.atomic.notify") (param $addr i32) (param $count i32) (result i32) | ||
(memory.atomic.notify (local.get 0) (local.get 1))) | ||
(func (export "memory.atomic.wait32") (param $addr i32) (param $expected i32) (param $timeout i64) (result i32) | ||
(memory.atomic.wait32 (local.get 0) (local.get 1) (local.get 2))) | ||
(func (export "memory.atomic.wait64") (param $addr i32) (param $expected i64) (param $timeout i64) (result i32) | ||
(memory.atomic.wait64 (local.get 0) (local.get 1) (local.get 2))) | ||
) | ||
|
||
;; non-zero offsets | ||
|
||
(invoke "initOffset" (i64.const 0xffffffffffff) (i32.const 64)) | ||
(assert_return (invoke "memory.atomic.wait32" (i32.const 64) (i32.const 0) (i64.const 0)) (i32.const 1)) | ||
(assert_return (invoke "memory.atomic.wait64" (i32.const 64) (i64.const 0xffffffffffff) (i64.const 10)) (i32.const 2)) | ||
(assert_return (invoke "memory.atomic.notify" (i32.const 64) (i32.const 10)) (i32.const 0)) |
Oops, something went wrong.