-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* memory.atomic.wait32/64 * memory.atomic.notify * atomic.fence * enable spec tests * fmt * remove commented tests * fix typos in comments * fix test post-rebase * gate wait/notify instructions * review edits
- Loading branch information
1 parent
5dfccc0
commit 1bd66bf
Showing
13 changed files
with
432 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(i32.store (i32.const 0) (i32.const 42)) | ||
(atomic.fence) | ||
(i32.load (i32.const 0)) | ||
)) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x10, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x5c | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movl $0x2a, %eax | ||
;; movl $0, %ecx | ||
;; movq 0x48(%r14), %r11 | ||
;; movq (%r11), %rdx | ||
;; addq %rcx, %rdx | ||
;; movl %eax, (%rdx) | ||
;; mfence | ||
;; movl $0, %eax | ||
;; movq 0x48(%r14), %r11 | ||
;; movq (%r11), %rcx | ||
;; addq %rax, %rcx | ||
;; movl (%rcx), %eax | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 5c: ud2 |
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,37 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(memory.atomic.notify (i32.const 0) (i32.const 10)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x20, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x6b | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movl $0xa, %eax | ||
;; movl $0, %ecx | ||
;; pushq %rcx | ||
;; subq $4, %rsp | ||
;; movl %eax, (%rsp) | ||
;; subq $4, %rsp | ||
;; movq %r14, %rdi | ||
;; movl $0, %esi | ||
;; movq 8(%rsp), %rdx | ||
;; movl 4(%rsp), %ecx | ||
;; callq 0x18e | ||
;; addq $4, %rsp | ||
;; addq $0xc, %rsp | ||
;; movq 8(%rsp), %r14 | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 6b: ud2 |
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,38 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(memory.atomic.notify offset=8 (i32.const 0) (i32.const 10)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x20, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x6f | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movl $0xa, %eax | ||
;; movl $0, %ecx | ||
;; addq $8, %rcx | ||
;; pushq %rcx | ||
;; subq $4, %rsp | ||
;; movl %eax, (%rsp) | ||
;; subq $4, %rsp | ||
;; movq %r14, %rdi | ||
;; movl $0, %esi | ||
;; movq 8(%rsp), %rdx | ||
;; movl 4(%rsp), %ecx | ||
;; callq 0x192 | ||
;; addq $4, %rsp | ||
;; addq $0xc, %rsp | ||
;; movq 8(%rsp), %r14 | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 6f: ud2 |
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,40 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(memory.atomic.wait32 (i32.const 4) (i32.const 0) (i64.const -1)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x30, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x78 | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movq $18446744073709551615, %rax | ||
;; movl $0, %ecx | ||
;; movl $4, %edx | ||
;; pushq %rdx | ||
;; subq $4, %rsp | ||
;; movl %ecx, (%rsp) | ||
;; pushq %rax | ||
;; subq $0xc, %rsp | ||
;; movq %r14, %rdi | ||
;; movl $0, %esi | ||
;; movq 0x18(%rsp), %rdx | ||
;; movl 0x14(%rsp), %ecx | ||
;; movq 0xc(%rsp), %r8 | ||
;; callq 0x19b | ||
;; addq $0xc, %rsp | ||
;; addq $0x14, %rsp | ||
;; movq 8(%rsp), %r14 | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 78: ud2 |
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,44 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(memory.atomic.wait32 offset=8 | ||
(i32.const 4) | ||
(i32.const 0) | ||
(i64.const -1)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x30, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x7c | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movq $18446744073709551615, %rax | ||
;; movl $0, %ecx | ||
;; movl $4, %edx | ||
;; addq $8, %rdx | ||
;; pushq %rdx | ||
;; subq $4, %rsp | ||
;; movl %ecx, (%rsp) | ||
;; pushq %rax | ||
;; subq $0xc, %rsp | ||
;; movq %r14, %rdi | ||
;; movl $0, %esi | ||
;; movq 0x18(%rsp), %rdx | ||
;; movl 0x14(%rsp), %ecx | ||
;; movq 0xc(%rsp), %r8 | ||
;; callq 0x19f | ||
;; addq $0xc, %rsp | ||
;; addq $0x14, %rsp | ||
;; movq 8(%rsp), %r14 | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 7c: ud2 |
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,39 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(memory.atomic.wait64 (i32.const 4) (i64.const 0) (i64.const -1)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x30, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x75 | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movq $18446744073709551615, %rax | ||
;; movq $0, %rcx | ||
;; movl $4, %edx | ||
;; pushq %rdx | ||
;; pushq %rcx | ||
;; pushq %rax | ||
;; subq $8, %rsp | ||
;; movq %r14, %rdi | ||
;; movl $0, %esi | ||
;; movq 0x18(%rsp), %rdx | ||
;; movq 0x10(%rsp), %rcx | ||
;; movq 8(%rsp), %r8 | ||
;; callq 0x198 | ||
;; addq $8, %rsp | ||
;; addq $0x18, %rsp | ||
;; movq 8(%rsp), %r14 | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 75: ud2 |
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,43 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(memory.atomic.wait64 offset=8 | ||
(i32.const 4) | ||
(i64.const 0) | ||
(i64.const -1)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x30, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x79 | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movq $18446744073709551615, %rax | ||
;; movq $0, %rcx | ||
;; movl $4, %edx | ||
;; addq $8, %rdx | ||
;; pushq %rdx | ||
;; pushq %rcx | ||
;; pushq %rax | ||
;; subq $8, %rsp | ||
;; movq %r14, %rdi | ||
;; movl $0, %esi | ||
;; movq 0x18(%rsp), %rdx | ||
;; movq 0x10(%rsp), %rcx | ||
;; movq 8(%rsp), %r8 | ||
;; callq 0x19c | ||
;; addq $8, %rsp | ||
;; addq $0x18, %rsp | ||
;; movq 8(%rsp), %r14 | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 79: ud2 |
Oops, something went wrong.