mirror of
https://github.com/danog/ir.git
synced 2024-12-02 09:38:29 +01:00
26 lines
358 B
Plaintext
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
|