mirror of
https://github.com/danog/ir.git
synced 2024-11-30 04:39:43 +01:00
25 lines
370 B
Plaintext
25 lines
370 B
Plaintext
--TEST--
|
|
002: alloca function
|
|
--TARGET--
|
|
aarch64
|
|
--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:
|
|
stp x29, x30, [sp, #-0x10]!
|
|
mov x29, sp
|
|
add x0, x0, #7
|
|
and x0, x0, #0xfffffffffffffff8
|
|
sub sp, sp, x0
|
|
mov x0, sp
|
|
mov sp, x29
|
|
ldp x29, x30, [sp], #0x10
|
|
ret
|