mirror of
https://github.com/danog/ir.git
synced 2024-12-11 16:59:46 +01:00
69 lines
1.6 KiB
Plaintext
69 lines
1.6 KiB
Plaintext
--TEST--
|
|
002: Argument Passing
|
|
--TARGET--
|
|
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);
|
|
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--
|
|
test:
|
|
subq $0x18, %rsp
|
|
leaq .L9(%rip), %rdi
|
|
movsd .L1(%rip), %xmm0
|
|
movsd .L2(%rip), %xmm1
|
|
movsd .L3(%rip), %xmm2
|
|
movsd .L4(%rip), %xmm3
|
|
movsd .L5(%rip), %xmm4
|
|
movsd .L6(%rip), %xmm5
|
|
movsd .L7(%rip), %xmm6
|
|
movsd .L8(%rip), %xmm7
|
|
movabsq $0x3feccccccccccccd, %rax
|
|
movq %rax, (%rsp)
|
|
movq $0, 8(%rsp)
|
|
movabsq $_IO_printf, %rax
|
|
callq *%rax
|
|
addq $0x18, %rsp
|
|
retq
|
|
.rodata
|
|
.db 0x90, 0x90, 0x90, 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 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0xd9, 0x3f
|
|
.L5:
|
|
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f
|
|
.L6:
|
|
.db 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xe3, 0x3f
|
|
.L7:
|
|
.db 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x3f
|
|
.L8:
|
|
.db 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0xe9, 0x3f
|
|
.L9:
|
|
.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
|