summary refs log tree commit diff stats
path: root/tinyc/lib/alloca-arm.S
diff options
context:
space:
mode:
Diffstat (limited to 'tinyc/lib/alloca-arm.S')
-rw-r--r--tinyc/lib/alloca-arm.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/tinyc/lib/alloca-arm.S b/tinyc/lib/alloca-arm.S
new file mode 100644
index 000000000..68556e36d
--- /dev/null
+++ b/tinyc/lib/alloca-arm.S
@@ -0,0 +1,17 @@
+	.text
+	.align	2
+	.global	alloca
+	.type	alloca, %function
+alloca:
+#ifdef __TINYC__
+        .int 0xe060d00d
+        .int 0xe3cdd007
+        .int 0xe1a0000d
+        .int 0xe1a0f00e
+#else
+	rsb	sp, r0, sp
+	bic	sp, sp, #7
+	mov	r0, sp
+	mov	pc, lr
+#endif
+	.size	alloca, .-alloca