Skip to content

Commit

Permalink
Fix Windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Mar 14, 2024
1 parent 9176609 commit 76be83b
Show file tree
Hide file tree
Showing 14 changed files with 101 additions and 30 deletions.
10 changes: 4 additions & 6 deletions tests/debug.Windows-x86_64/call2.irt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Windows-x86_64
}
--EXPECT--
test:
subq $0x28, %rsp
movq %rbx, 0x20(%rsp)
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebx
movl %edx, %eax
movl %r8d, %edx
Expand All @@ -33,12 +33,10 @@ test:
leaq .L1(%rip), %rcx
callq printf
addl %ebx, %eax
movq 0x20(%rsp), %rbx
addq $0x28, %rsp
addq $0x20, %rsp
popq %rbx
retq
.rodata
.db 0x90, 0x90
.L1:
.db 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x25, 0x64, 0x21, 0x0a, 0x00


8 changes: 4 additions & 4 deletions tests/debug.Windows-x86_64/call3.irt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Windows-x86_64
}
--EXPECT--
test:
subq $0x28, %rsp
movq %rbx, 0x20(%rsp)
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebx
movq 0x30(%rsp), %rax
movl %edx, %r10d
Expand All @@ -31,8 +31,8 @@ test:
leaq .L1(%rip), %rcx
callq *(%rax)
addl %ebx, %eax
movq 0x20(%rsp), %rbx
addq $0x28, %rsp
addq $0x20, %rsp
popq %rbx
retq
.rodata
.db 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90
Expand Down
14 changes: 14 additions & 0 deletions tests/debug.Windows-x86_64/dessa_002.irt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ Windows-x86_64
--EXPECT--
test:
jmp .L2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
.L1:
movl %eax, %ecx
.L2:
Expand Down
1 change: 1 addition & 0 deletions tests/debug.Windows-x86_64/dessa_003.irt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test:
cltd
idivl %ecx
jmp .L2
nop
.L1:
xchgl %eax, %r9d
.L2:
Expand Down
29 changes: 19 additions & 10 deletions tests/debug.Windows-x86_64/fig.irt
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ Windows-x86_64
}
--EXPECT--
test:
subq $0x20, %rsp
movq %rbx, 0x18(%rsp)
movq %rbp, 0x10(%rsp)
movq %rsi, 8(%rsp)
movq %rdi, (%rsp)
pushq %rbx
pushq %rbp
pushq %rsi
pushq %rdi
movl 0x30(%rsp), %eax
movl 0x38(%rsp), %r10d
movl 0x40(%rsp), %r11d
Expand All @@ -80,6 +79,17 @@ test:
imull %edx, %esi
leal 4(%rsi), %edi
jmp .L3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
.L1:
movl %ecx, %r10d
imull %edx, %r10d
Expand All @@ -105,9 +115,8 @@ test:
addl %r10d, %eax
addl %r11d, %eax
leal 1(%rax, %rbx), %eax
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %rbp
movq 8(%rsp), %rsi
movq (%rsp), %rdi
addq $0x20, %rsp
popq %rdi
popq %rsi
popq %rbp
popq %rbx
retq
10 changes: 10 additions & 0 deletions tests/debug.Windows-x86_64/loop_002.irt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ test:
xorl %ecx, %ecx
xorl %eax, %eax
jmp .L4
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
.L1:
cmpl %ecx, %edx
je .L2
Expand Down
8 changes: 8 additions & 0 deletions tests/debug.Windows-x86_64/regset-fib.irt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ main:
movsd %xmm0, 0x20(%rsp)
xorpd %xmm0, %xmm0
jmp .L2
nop
nop
nop
nop
nop
nop
nop
nop
.L1:
addsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
Expand Down
8 changes: 8 additions & 0 deletions tests/debug.Windows-x86_64/regset-fib2.irt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ main:
movsd %xmm0, 0x20(%rsp)
xorpd %xmm0, %xmm0
jmp .L2
nop
nop
nop
nop
nop
nop
nop
nop
.L1:
addsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
Expand Down
15 changes: 8 additions & 7 deletions tests/debug.Windows-x86_64/regset-fibi.irt
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ R3 (d_9) [%ebp]: [9.2-13.0), DEF(9.2)!, PHI_USE(12.2, phi=d_5/3)
[%SCRATCH] : [10.1-10.2)
}
main:
subq $0x38, %rsp
movq %rbx, 0x30(%rsp)
movq %rbp, 0x28(%rsp)
pushq %rbx
pushq %rbp
subq $0x28, %rsp
movl $1, %ebx
xorl %eax, %eax
jmp .L2
nop
.L1:
leal (%rbx, %rax), %ebp
movl %ebx, %edx
Expand All @@ -82,12 +83,12 @@ main:
cmpl $0x2710, %ebx
jl .L1
xorl %eax, %eax
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %rbp
addq $0x38, %rsp
addq $0x28, %rsp
popq %rbp
popq %rbx
retq
.rodata
.db 0x90, 0x90, 0x90
.db 0x90, 0x90
.L3:
.db 0x25, 0x64, 0x0a, 0x00

Expand Down
3 changes: 2 additions & 1 deletion tests/debug.Windows-x86_64/regset-test.irt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ test:
movsd %xmm0, 0x18(%rsp)
xorl %eax, %eax
jmp .L2
nop
.L1:
movsd 0x10(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
Expand Down Expand Up @@ -176,7 +177,7 @@ test:
addq $0x28, %rsp
retq
.rodata
.db 0x90, 0x90, 0x90, 0x90, 0x90
.db 0x90, 0x90, 0x90, 0x90
.L4:
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f
.L5:
Expand Down
4 changes: 4 additions & 0 deletions tests/debug.Windows-x86_64/sccp_002.irt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ test:
movl $3, %eax
.L4:
retq
nop
nop
nop
nop
.L5:
testb %dl, %dl
jne .L5
Expand Down
5 changes: 3 additions & 2 deletions tests/debug.Windows-x86_64/test-mavx.irt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ test:
xorl %eax, %eax
vxorpd %xmm2, %xmm2, %xmm2
jmp .L2
nop
nop
.L1:
vmulsd %xmm3, %xmm2, %xmm3
vsubsd %xmm5, %xmm4, %xmm2
Expand All @@ -86,9 +88,8 @@ test:
addq $8, %rsp
retq
.rodata
.db 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90
.db 0x90, 0x90, 0x90, 0x90, 0x90
.L4:
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f
.L5:
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x40

4 changes: 4 additions & 0 deletions tests/debug.Windows-x86_64/test.irt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ test:
xorl %eax, %eax
xorpd %xmm2, %xmm2
jmp .L2
nop
nop
nop
.L1:
mulsd %xmm2, %xmm3
subsd %xmm5, %xmm4
Expand Down Expand Up @@ -90,6 +93,7 @@ test:
addq $8, %rsp
retq
.rodata
.db 0x90, 0x90, 0x90, 0x90, 0x90
.L4:
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f
.L5:
Expand Down
12 changes: 12 additions & 0 deletions tests/debug.Windows-x86_64/test64.irt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ test:
movabsq $0x200000000, %rax
xorpd %xmm2, %xmm2
jmp .L2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
.L1:
mulsd %xmm2, %xmm3
subsd %xmm5, %xmm4
Expand Down Expand Up @@ -91,6 +102,7 @@ test:
addq $8, %rsp
retq
.rodata
.db 0x90, 0x90, 0x90, 0x90, 0x90
.L4:
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f
.L5:
Expand Down

0 comments on commit 76be83b

Please sign in to comment.