blob: f2813b3ce67fb610516f819ac8cacecee71f4706 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
;;; TOOL: run-interp
;;; ARGS*: --enable-threads
(module
(memory 1 1 shared)
(func (export "i32.atomic.store8") (result i32)
i32.const 0 i32.const 0xfb i32.atomic.store8
i32.const 1 i32.const 0xfc i32.atomic.store8
i32.const 2 i32.const 0xfd i32.atomic.store8
i32.const 3 i32.const 0xfe i32.atomic.store8
i32.const 0 i32.load)
(func (export "i32.atomic.store16") (result i32)
i32.const 0 i32.const 0xcac9 i32.atomic.store16
i32.const 2 i32.const 0xcccb i32.atomic.store16
i32.const 0 i32.load)
(func (export "i32.atomic.store") (result i32)
i32.const 0 i32.const -123456 i32.atomic.store
i32.const 0 i32.load)
(func (export "i64.atomic.store8") (result i32)
i32.const 0 i64.const 0xeeeeeeeeeeeeeefb i64.atomic.store8
i32.const 1 i64.const 0xeeeeeeeeeeeeeefc i64.atomic.store8
i32.const 2 i64.const 0xeeeeeeeeeeeeeefd i64.atomic.store8
i32.const 3 i64.const 0xeeeeeeeeeeeeeefe i64.atomic.store8
i32.const 0 i32.load)
(func (export "i64.atomic.store16") (result i32)
i32.const 0 i64.const 0xeeeeeeeeeeeecac9 i64.atomic.store16
i32.const 2 i64.const 0xeeeeeeeeeeeecccb i64.atomic.store16
i32.const 0 i32.load)
(func (export "i64.atomic.store32") (result i32)
i32.const 0 i64.const -123456 i64.atomic.store32
i32.const 0 i32.load)
(func (export "i64.atomic.store") (result i64)
i32.const 0 i64.const 0xbaddc0de600dd00d i64.atomic.store
i32.const 0 i64.load)
;; Test bad alignment
(func (export "bad.align-i32.atomic.store16")
i32.const 1 i32.const 0 i32.atomic.store16)
(func (export "bad.align-i32.atomic.store")
i32.const 2 i32.const 0 i32.atomic.store)
(func (export "bad.align-i64.atomic.store16")
i32.const 1 i64.const 0 i64.atomic.store16)
(func (export "bad.align-i64.atomic.store32")
i32.const 2 i64.const 0 i64.atomic.store32)
(func (export "bad.align-i64.atomic.store")
i32.const 4 i64.const 0 i64.atomic.store)
)
(;; STDOUT ;;;
i32.atomic.store8() => i32:4278058235
i32.atomic.store16() => i32:3435907785
i32.atomic.store() => i32:4294843840
i64.atomic.store8() => i32:4278058235
i64.atomic.store16() => i32:3435907785
i64.atomic.store32() => i32:4294843840
i64.atomic.store() => i64:13465130522234441741
bad.align-i32.atomic.store16() => error: invalid atomic access at 1+0
bad.align-i32.atomic.store() => error: invalid atomic access at 2+0
bad.align-i64.atomic.store16() => error: invalid atomic access at 1+0
bad.align-i64.atomic.store32() => error: invalid atomic access at 2+0
bad.align-i64.atomic.store() => error: invalid atomic access at 4+0
;;; STDOUT ;;)
|