File tree Expand file tree Collapse file tree
test/spec/acquire-release-atomics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 (module
99 (memory (import " mem" " shared" ) 1 1 shared)
1010 (func (export " run" )
11- ;; a =rel 1
12- ;; b =rel 2
11+ ;; x =rel 1
12+ ;; y =rel 2
1313 (i32.atomic.store acqrel (i32.const 0 ) (i32.const 1 ))
1414 (i32.atomic.store acqrel (i32.const 4 ) (i32.const 2 ))
1515 )
2121 (module
2222 (memory (import " mem" " shared" ) 1 1 shared)
2323 (func (export " run" )
24- ;; b =rel 3
25- ;; a =rel 4
24+ ;; y =rel 3
25+ ;; x =rel 4
2626 (i32.atomic.store acqrel (i32.const 4 ) (i32.const 3 ))
2727 (i32.atomic.store acqrel (i32.const 0 ) (i32.const 4 ))
2828 )
3636(module
3737 (memory (import " mem" " shared" ) 1 1 shared)
3838 (func (export " check" ) (result i32 i32 )
39- ;; read a, b
39+ ;; read x, y
4040 (i32.load (i32.const 0 ))
4141 (i32.load (i32.const 4 ))
4242 )
4343)
4444
4545;; Nothing is synchronized so all 4 interleavings are possible.
46- ;; a =1, b =3 is only possible with acqrel, while others are also possible with
46+ ;; x =1, y =3 is only possible with acqrel, while others are also possible with
4747;; seqcst.
4848(assert_return (invoke " check" )
4949 (either (i32.const 1 ) (i32.const 4 ))
You can’t perform that action at this time.
0 commit comments