ir/tests/debug/params_002.irt

44 lines
958 B
Plaintext
Raw Normal View History

2022-05-17 14:00:58 +02:00
--TEST--
002: Parameter Loading
2022-05-25 16:38:22 +02:00
--TARGET--
x86_64
2022-05-17 14:00:58 +02:00
--ARGS--
-S
--CODE--
{
l_1 = START(l_2);
double p_1 = PARAM(l_1, "p_1", 1);
double p_2 = PARAM(l_1, "p_2", 1);
double p_3 = PARAM(l_1, "p_3", 1);
double p_4 = PARAM(l_1, "p_4", 1);
double p_5 = PARAM(l_1, "p_5", 1);
double p_6 = PARAM(l_1, "p_6", 1);
double p_7 = PARAM(l_1, "p_7", 1);
double p_8 = PARAM(l_1, "p_8", 1);
double p_9 = PARAM(l_1, "p_9", 1);
double p_10 = PARAM(l_1, "p_10", 1);
double r1 = ADD(p_1, p_2);
double r2 = ADD(r1, p_3);
double r3 = ADD(r2, p_4);
double r4 = ADD(r3, p_5);
double r5 = ADD(r4, p_6);
double r6 = ADD(r5, p_7);
double r7 = ADD(r6, p_8);
double r8 = ADD(r7, p_9);
double ret = SUB(r8, p_10);
l_2 = RETURN(l_1, ret);
}
--EXPECT--
test:
addsd %xmm0, %xmm1
addsd %xmm2, %xmm1
addsd %xmm3, %xmm1
addsd %xmm4, %xmm1
addsd %xmm5, %xmm1
addsd %xmm6, %xmm1
addsd %xmm7, %xmm1
movapd %xmm1, %xmm0
addsd 8(%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
2022-05-17 14:00:58 +02:00
retq