mirror of
https://github.com/danog/ir.git
synced 2024-12-11 16:59:46 +01:00
80 lines
1.8 KiB
Plaintext
80 lines
1.8 KiB
Plaintext
--TEST--
|
|
002: Argument Passing
|
|
--TARGET--
|
|
x86
|
|
--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:
|
|
subl $0x5c, %esp
|
|
leal .L10, %eax
|
|
movl %eax, (%esp)
|
|
movsd .L1, %xmm7
|
|
movsd %xmm7, 4(%esp)
|
|
movsd .L2, %xmm7
|
|
movsd %xmm7, 0xc(%esp)
|
|
movsd .L3, %xmm7
|
|
movsd %xmm7, 0x14(%esp)
|
|
movsd .L4, %xmm7
|
|
movsd %xmm7, 0x1c(%esp)
|
|
movsd .L5, %xmm7
|
|
movsd %xmm7, 0x24(%esp)
|
|
movsd .L6, %xmm7
|
|
movsd %xmm7, 0x2c(%esp)
|
|
movsd .L7, %xmm7
|
|
movsd %xmm7, 0x34(%esp)
|
|
movsd .L8, %xmm7
|
|
movsd %xmm7, 0x3c(%esp)
|
|
movsd .L9, %xmm7
|
|
movsd %xmm7, 0x44(%esp)
|
|
xorpd %xmm7, %xmm7
|
|
movsd %xmm7, 0x4c(%esp)
|
|
calll printf
|
|
addl $0x5c, %esp
|
|
retl
|
|
.rodata
|
|
.db 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 0xcd, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xec, 0x3f
|
|
.L10:
|
|
.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
|