-
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.
- Loading branch information
1 parent
c72de0b
commit d36a7c9
Showing
12 changed files
with
340 additions
and
13 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
tests/disas/winch/x64/atomic/rmw/i32_atomic_rmw16_xchgu.wat
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,35 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(i32.atomic.rmw16.xchg_u (i32.const 0) (i32.const 42)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x10, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x5f | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movl $0x2a, %eax | ||
;; movl $0, %ecx | ||
;; andw $1, %cx | ||
;; cmpw $0, %cx | ||
;; jne 0x61 | ||
;; 44: movl $0, %ecx | ||
;; movq 0x58(%r14), %r11 | ||
;; movq (%r11), %rdx | ||
;; addq %rcx, %rdx | ||
;; xchgw %ax, (%rdx) | ||
;; movzwl %ax, %eax | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 5f: ud2 | ||
;; 61: ud2 |
30 changes: 30 additions & 0 deletions
30
tests/disas/winch/x64/atomic/rmw/i32_atomic_rmw8_xchgu.wat
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,30 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(i32.atomic.rmw8.xchg_u (i32.const 0) (i32.const 42)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x10, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x4b | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movl $0x2a, %eax | ||
;; movl $0, %ecx | ||
;; movq 0x58(%r14), %r11 | ||
;; movq (%r11), %rdx | ||
;; addq %rcx, %rdx | ||
;; xchgb %al, (%rdx) | ||
;; movzbl %al, %eax | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 4b: 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,34 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i32) | ||
(i32.atomic.rmw.xchg (i32.const 0) (i32.const 42)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x10, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x59 | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movl $0x2a, %eax | ||
;; movl $0, %ecx | ||
;; andl $3, %ecx | ||
;; cmpl $0, %ecx | ||
;; jne 0x5b | ||
;; 42: movl $0, %ecx | ||
;; movq 0x58(%r14), %r11 | ||
;; movq (%r11), %rdx | ||
;; addq %rcx, %rdx | ||
;; xchgl %eax, (%rdx) | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 59: ud2 | ||
;; 5b: ud2 |
35 changes: 35 additions & 0 deletions
35
tests/disas/winch/x64/atomic/rmw/i64_atomic_rmw16_xchgu.wat
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,35 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i64) | ||
(i64.atomic.rmw16.xchg_u (i32.const 0) (i64.const 42)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x10, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x62 | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movq $0x2a, %rax | ||
;; movl $0, %ecx | ||
;; andw $1, %cx | ||
;; cmpw $0, %cx | ||
;; jne 0x64 | ||
;; 46: movl $0, %ecx | ||
;; movq 0x58(%r14), %r11 | ||
;; movq (%r11), %rdx | ||
;; addq %rcx, %rdx | ||
;; xchgw %ax, (%rdx) | ||
;; movzwq %ax, %rax | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 62: ud2 | ||
;; 64: 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
35 changes: 35 additions & 0 deletions
35
tests/disas/winch/x64/atomic/rmw/i64_atomic_rmw32_xchgu.wat
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,35 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i64) | ||
(i64.atomic.rmw32.xchg_u (i32.const 0) (i64.const 42)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x10, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x5d | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movq $0x2a, %rax | ||
;; movl $0, %ecx | ||
;; andl $3, %ecx | ||
;; cmpl $0, %ecx | ||
;; jne 0x5f | ||
;; 44: movl $0, %ecx | ||
;; movq 0x58(%r14), %r11 | ||
;; movq (%r11), %rdx | ||
;; addq %rcx, %rdx | ||
;; xchgl %eax, (%rdx) | ||
;; movl %eax, %eax | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 5d: ud2 | ||
;; 5f: ud2 |
30 changes: 30 additions & 0 deletions
30
tests/disas/winch/x64/atomic/rmw/i64_atomic_rmw8_xchgu.wat
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,30 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i64) | ||
(i64.atomic.rmw8.xchg_u (i32.const 0) (i64.const 42)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x10, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x4e | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movq $0x2a, %rax | ||
;; movl $0, %ecx | ||
;; movq 0x58(%r14), %r11 | ||
;; movq (%r11), %rdx | ||
;; addq %rcx, %rdx | ||
;; xchgb %al, (%rdx) | ||
;; movzbq %al, %rax | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 4e: 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,34 @@ | ||
;;! target = "x86_64" | ||
;;! test = "winch" | ||
|
||
(module | ||
(memory 1 1 shared) | ||
(func (export "_start") (result i64) | ||
(i64.atomic.rmw.xchg (i32.const 0) (i64.const 42)))) | ||
;; wasm[0]::function[0]: | ||
;; pushq %rbp | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r11 | ||
;; movq 0x10(%r11), %r11 | ||
;; addq $0x10, %r11 | ||
;; cmpq %rsp, %r11 | ||
;; ja 0x5e | ||
;; 1c: movq %rdi, %r14 | ||
;; subq $0x10, %rsp | ||
;; movq %rdi, 8(%rsp) | ||
;; movq %rsi, (%rsp) | ||
;; movq $0x2a, %rax | ||
;; movl $0, %ecx | ||
;; andq $7, %rcx | ||
;; cmpq $0, %rcx | ||
;; jne 0x60 | ||
;; 46: movl $0, %ecx | ||
;; movq 0x58(%r14), %r11 | ||
;; movq (%r11), %rdx | ||
;; addq %rcx, %rdx | ||
;; xchgq %rax, (%rdx) | ||
;; addq $0x10, %rsp | ||
;; popq %rbp | ||
;; retq | ||
;; 5e: ud2 | ||
;; 60: 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
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
Oops, something went wrong.