Skip to content

Commit

Permalink
review edits
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinPostma committed Jan 14, 2025
1 parent e462bb3 commit 25a703c
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 100 deletions.
13 changes: 6 additions & 7 deletions tests/disas/winch/x64/atomic/load/i32_atomic_load.wat
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,22 @@
;; movq 0x10(%r11), %r11
;; addq $0x20, %r11
;; cmpq %rsp, %r11
;; ja 0x57
;; ja 0x55
;; 1c: movq %rdi, %r14
;; subq $0x20, %rsp
;; movq %rdi, 0x18(%rsp)
;; movq %rsi, 0x10(%rsp)
;; movl %edx, 0xc(%rsp)
;; movl 0xc(%rsp), %eax
;; andl $3, %eax
;; cmpl $0, %eax
;; jne 0x59
;; 41: movl 0xc(%rsp), %eax
;; movq 0x58(%r14), %r11
;; andl $3, %r11d
;; cmpl $0, %r11d
;; jne 0x57
;; 43: movq 0x58(%r14), %r11
;; movq (%r11), %rcx
;; addq %rax, %rcx
;; movl (%rcx), %eax
;; addq $0x20, %rsp
;; popq %rbp
;; retq
;; 55: ud2
;; 57: ud2
;; 59: ud2
13 changes: 6 additions & 7 deletions tests/disas/winch/x64/atomic/load/i32_atomic_load16_u.wat
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,22 @@
;; movq 0x10(%r11), %r11
;; addq $0x20, %r11
;; cmpq %rsp, %r11
;; ja 0x5b
;; ja 0x59
;; 1c: movq %rdi, %r14
;; subq $0x20, %rsp
;; movq %rdi, 0x18(%rsp)
;; movq %rsi, 0x10(%rsp)
;; movl %edx, 0xc(%rsp)
;; movl 0xc(%rsp), %eax
;; andw $1, %ax
;; cmpw $0, %ax
;; jne 0x5d
;; 43: movl 0xc(%rsp), %eax
;; movq 0x58(%r14), %r11
;; andw $1, %r11w
;; cmpw $0, %r11w
;; jne 0x5b
;; 45: movq 0x58(%r14), %r11
;; movq (%r11), %rcx
;; addq %rax, %rcx
;; movzwq (%rcx), %rax
;; addq $0x20, %rsp
;; popq %rbp
;; retq
;; 59: ud2
;; 5b: ud2
;; 5d: ud2
15 changes: 7 additions & 8 deletions tests/disas/winch/x64/atomic/load/i64_atomic_load.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@
;; movq 0x10(%r11), %r11
;; addq $0x10, %r11
;; cmpq %rsp, %r11
;; ja 0x54
;; ja 0x4f
;; 1c: movq %rdi, %r14
;; subq $0x10, %rsp
;; movq %rdi, 8(%rsp)
;; movq %rsi, (%rsp)
;; movl $0, %eax
;; andq $7, %rax
;; cmpq $0, %rax
;; jne 0x56
;; 3f: movl $0, %eax
;; movq 0x60(%r14), %rcx
;; andq $7, %r11
;; cmpq $0, %r11
;; jne 0x51
;; 3f: movq 0x60(%r14), %rcx
;; addq %rax, %rcx
;; movq (%rcx), %rax
;; addq $0x10, %rsp
;; popq %rbp
;; retq
;; 54: ud2
;; 56: ud2
;; 4f: ud2
;; 51: ud2
15 changes: 7 additions & 8 deletions tests/disas/winch/x64/atomic/load/i64_atomic_load16_u.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@
;; movq 0x10(%r11), %r11
;; addq $0x10, %r11
;; cmpq %rsp, %r11
;; ja 0x55
;; ja 0x52
;; 1c: movq %rdi, %r14
;; subq $0x10, %rsp
;; movq %rdi, 8(%rsp)
;; movq %rsi, (%rsp)
;; movl $0, %eax
;; andw $1, %ax
;; cmpw $0, %ax
;; jne 0x57
;; 3f: movl $0, %eax
;; movq 0x60(%r14), %rcx
;; andw $1, %r11w
;; cmpw $0, %r11w
;; jne 0x54
;; 41: movq 0x60(%r14), %rcx
;; addq %rax, %rcx
;; movzwq (%rcx), %rax
;; addq $0x10, %rsp
;; popq %rbp
;; retq
;; 55: ud2
;; 57: ud2
;; 52: ud2
;; 54: ud2
15 changes: 7 additions & 8 deletions tests/disas/winch/x64/atomic/load/i64_atomic_load32_u.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@
;; movq 0x10(%r11), %r11
;; addq $0x10, %r11
;; cmpq %rsp, %r11
;; ja 0x51
;; ja 0x4e
;; 1c: movq %rdi, %r14
;; subq $0x10, %rsp
;; movq %rdi, 8(%rsp)
;; movq %rsi, (%rsp)
;; movl $0, %eax
;; andl $3, %eax
;; cmpl $0, %eax
;; jne 0x53
;; 3d: movl $0, %eax
;; movq 0x60(%r14), %rcx
;; andl $3, %r11d
;; cmpl $0, %r11d
;; jne 0x50
;; 3f: movq 0x60(%r14), %rcx
;; addq %rax, %rcx
;; movl (%rcx), %eax
;; addq $0x10, %rsp
;; popq %rbp
;; retq
;; 51: ud2
;; 53: ud2
;; 4e: ud2
;; 50: ud2
15 changes: 7 additions & 8 deletions tests/disas/winch/x64/atomic/store/i32_atomic_store.wat
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,23 @@
;; movq 0x10(%r11), %r11
;; addq $0x10, %r11
;; cmpq %rsp, %r11
;; ja 0x5c
;; 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 0x5e
;; 42: movl $0, %ecx
;; movq 0x58(%r14), %r11
;; andl $3, %r11d
;; cmpl $0, %r11d
;; jne 0x5b
;; 44: movq 0x58(%r14), %r11
;; movq (%r11), %rdx
;; addq %rcx, %rdx
;; movl %eax, (%rdx)
;; mfence
;; addq $0x10, %rsp
;; popq %rbp
;; retq
;; 5c: ud2
;; 5e: ud2
;; 59: ud2
;; 5b: ud2
15 changes: 7 additions & 8 deletions tests/disas/winch/x64/atomic/store/i32_atomic_store16.wat
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,23 @@
;; movq 0x10(%r11), %r11
;; addq $0x10, %r11
;; cmpq %rsp, %r11
;; ja 0x5f
;; ja 0x5c
;; 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
;; andw $1, %r11w
;; cmpw $0, %r11w
;; jne 0x5e
;; 46: movq 0x58(%r14), %r11
;; movq (%r11), %rdx
;; addq %rcx, %rdx
;; movw %ax, (%rdx)
;; mfence
;; addq $0x10, %rsp
;; popq %rbp
;; retq
;; 5f: ud2
;; 61: ud2
;; 5c: ud2
;; 5e: ud2
15 changes: 7 additions & 8 deletions tests/disas/winch/x64/atomic/store/i64_atomic_store.wat
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,23 @@
;; movq 0x10(%r11), %r11
;; addq $0x10, %r11
;; cmpq %rsp, %r11
;; ja 0x61
;; ja 0x5c
;; 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 0x63
;; 46: movl $0, %ecx
;; movq 0x58(%r14), %r11
;; andq $7, %r11
;; cmpq $0, %r11
;; jne 0x5e
;; 46: movq 0x58(%r14), %r11
;; movq (%r11), %rdx
;; addq %rcx, %rdx
;; movq %rax, (%rdx)
;; mfence
;; addq $0x10, %rsp
;; popq %rbp
;; retq
;; 61: ud2
;; 63: ud2
;; 5c: ud2
;; 5e: ud2
15 changes: 7 additions & 8 deletions tests/disas/winch/x64/atomic/store/i64_atomic_store16.wat
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,23 @@
;; movq 0x10(%r11), %r11
;; addq $0x10, %r11
;; cmpq %rsp, %r11
;; ja 0x61
;; ja 0x5e
;; 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 0x63
;; 46: movl $0, %ecx
;; movq 0x58(%r14), %r11
;; andw $1, %r11w
;; cmpw $0, %r11w
;; jne 0x60
;; 48: movq 0x58(%r14), %r11
;; movq (%r11), %rdx
;; addq %rcx, %rdx
;; movw %ax, (%rdx)
;; mfence
;; addq $0x10, %rsp
;; popq %rbp
;; retq
;; 61: ud2
;; 63: ud2
;; 5e: ud2
;; 60: ud2
15 changes: 7 additions & 8 deletions tests/disas/winch/x64/atomic/store/i64_atomic_store32.wat
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,23 @@
;; movq 0x10(%r11), %r11
;; addq $0x10, %r11
;; cmpq %rsp, %r11
;; ja 0x5e
;; ja 0x5b
;; 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 0x60
;; 44: movl $0, %ecx
;; movq 0x58(%r14), %r11
;; andl $3, %r11d
;; cmpl $0, %r11d
;; jne 0x5d
;; 46: movq 0x58(%r14), %r11
;; movq (%r11), %rdx
;; addq %rcx, %rdx
;; movl %eax, (%rdx)
;; mfence
;; addq $0x10, %rsp
;; popq %rbp
;; retq
;; 5e: ud2
;; 60: ud2
;; 5b: ud2
;; 5d: ud2
Loading

0 comments on commit 25a703c

Please sign in to comment.