mirror of
https://github.com/danog/ir.git
synced 2024-12-11 16:59:46 +01:00
67 lines
1.5 KiB
Plaintext
Executable File
67 lines
1.5 KiB
Plaintext
Executable File
--TEST--
|
|
002: Argument Passing
|
|
--TARGET--
|
|
Windows-x86_64
|
|
--ARGS--
|
|
-S --run
|
|
--CODE--
|
|
{
|
|
double c_1 = 0.1;
|
|
double c_2 = 0.2;
|
|
double c_3 = 0.3;
|
|
double c_4 = 0.4;
|
|
double c_5 = 0.5;
|
|
double c_6 = 0.6;
|
|
double c_7 = 0.7;
|
|
double c_8 = 0.8;
|
|
double c_9 = 0.9;
|
|
double c_10 = 0.0;
|
|
uintptr_t f = func(printf, 4);
|
|
uintptr_t fmt = "%g %g %g %g %g %g %g %g %g %g\n";
|
|
l_1 = START(l_3);
|
|
int32_t d_2, l_2 = CALL/11(l_1, f, fmt, c_1, c_2, c_3, c_4, c_5, c_6, c_7, c_8, c_9, c_10);
|
|
l_3 = RETURN(l_2, d_2);
|
|
}
|
|
--EXPECT--
|
|
main:
|
|
subq $0x58, %rsp
|
|
leaq .L4(%rip), %rcx
|
|
movsd .L1(%rip), %xmm1
|
|
movsd .L2(%rip), %xmm2
|
|
movsd .L3(%rip), %xmm3
|
|
movabsq $0x3fd999999999999a, %rax
|
|
movq %rax, 0x20(%rsp)
|
|
movabsq $0x3fe0000000000000, %rax
|
|
movq %rax, 0x28(%rsp)
|
|
movabsq $0x3fe3333333333333, %rax
|
|
movq %rax, 0x30(%rsp)
|
|
movabsq $0x3fe6666666666666, %rax
|
|
movq %rax, 0x38(%rsp)
|
|
movabsq $0x3fe999999999999a, %rax
|
|
movq %rax, 0x40(%rsp)
|
|
movabsq $0x3feccccccccccccd, %rax
|
|
movq %rax, 0x48(%rsp)
|
|
movq $0, 0x50(%rsp)
|
|
movq %xmm1, %rdx
|
|
movq %xmm2, %r8
|
|
movq %xmm3, %r9
|
|
movabsq $printf, %rax
|
|
callq *%rax
|
|
addq $0x58, %rsp
|
|
retq
|
|
.rodata
|
|
.db 0x90, 0x90
|
|
.L1:
|
|
.db 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0xb9, 0x3f
|
|
.L2:
|
|
.db 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0xc9, 0x3f
|
|
.L3:
|
|
.db 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xd3, 0x3f
|
|
.L4:
|
|
.db 0x25, 0x67, 0x20, 0x25, 0x67, 0x20, 0x25, 0x67, 0x20, 0x25, 0x67, 0x20, 0x25, 0x67, 0x20, 0x25
|
|
.db 0x67, 0x20, 0x25, 0x67, 0x20, 0x25, 0x67, 0x20, 0x25, 0x67, 0x20, 0x25, 0x67, 0x0a, 0x00
|
|
|
|
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0
|
|
|
|
exit code = 38
|