diff options
| author | Michael Matz <matz@suse.de> | 2014-04-05 22:54:11 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2014-04-05 22:54:11 +0200 |
| commit | c4427747e6e5890b65c70e8fad5b30309b2b0279 (patch) | |
| tree | c3c841302d0918a594324ef0ec97341eee69b8ce /lib/alloca-arm.S | |
| parent | b0f8ca5e0306b09077866d959b307618755513cd (diff) | |
| download | tinycc-c4427747e6e5890b65c70e8fad5b30309b2b0279.tar.gz tinycc-c4427747e6e5890b65c70e8fad5b30309b2b0279.tar.bz2 | |
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.
Diffstat (limited to 'lib/alloca-arm.S')
| -rw-r--r-- | lib/alloca-arm.S | 11 |
1 files changed, 11 insertions, 0 deletions
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 |
