mirror of
https://github.com/danog/ir.git
synced 2024-12-12 09:19:47 +01:00
73 lines
1.6 KiB
Plaintext
73 lines
1.6 KiB
Plaintext
--TEST--
|
|
002: Argument Passing
|
|
--TARGET--
|
|
aarch64
|
|
--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:
|
|
stp x29, x30, [sp, #-0x10]!
|
|
mov x29, sp
|
|
sub sp, sp, #0x10
|
|
adr x0, .L10
|
|
ldr d0, .L1
|
|
ldr d1, .L2
|
|
ldr d2, .L3
|
|
ldr d3, .L4
|
|
ldr d4, .L5
|
|
ldr d5, .L6
|
|
ldr d6, .L7
|
|
ldr d7, .L8
|
|
ldr d31, .L9
|
|
str d31, [sp]
|
|
fmov d31, xzr
|
|
str d31, [sp, #8]
|
|
bl printf
|
|
add sp, sp, #0x10
|
|
ldp x29, x30, [sp], #0x10
|
|
ret
|
|
.rodata
|
|
.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, 0x00
|
|
|
|
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0
|
|
|
|
exit code = 38
|