tinycc/lib/alloca-arm.S
Michael Matz c4427747e6 arm: Provide alloca()
This provides a simple implementation of alloca for ARM (and enables
the associated testcase).  As tcc for ARM doesn't contain an assembler,
we'll have to resort using gcc for compiling it.
2014-04-05 22:54:11 +02:00

12 lines
185 B
ArmAsm

.text
.align 2
.global alloca
.type alloca, %function
alloca:
rsb sp, r0, sp
bic sp, sp, #7
mov r0, sp
mov pc, lr
.size alloca, .-alloca
.section .note.GNU-stack,"",%progbits