ir/tests/x86/alloca_002.irt
2022-11-08 11:56:22 +03:00

26 lines
358 B
Plaintext

--TEST--
002: alloca function
--TARGET--
x86
--ARGS--
-S
--CODE--
{
l_1 = START(l_4);
int32_t x = PARAM(l_1, "x", 1);
uintptr_t ret, l_2 = ALLOCA(l_1, x);
l_4 = RETURN(l_2, ret);
}
--EXPECT--
test:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
addl $7, %eax
andl $0xfffffff8, %eax
subl %eax, %esp
movl %esp, %eax
movl %ebp, %esp
popl %ebp
retl