From c4427747e6e5890b65c70e8fad5b30309b2b0279 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sat, 5 Apr 2014 22:54:11 +0200 Subject: 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. --- lib/alloca-arm.S | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/alloca-arm.S (limited to 'lib/alloca-arm.S') diff --git a/lib/alloca-arm.S b/lib/alloca-arm.S new file mode 100644 index 0000000..9deae63 --- /dev/null +++ b/lib/alloca-arm.S @@ -0,0 +1,11 @@ + .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 -- cgit v1.3.1