summaryrefslogtreecommitdiff
path: root/arch/arm/lib/setjmp.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lib/setjmp.S')
-rw-r--r--arch/arm/lib/setjmp.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/lib/setjmp.S b/arch/arm/lib/setjmp.S
index 2f041aeef01..81bef578719 100644
--- a/arch/arm/lib/setjmp.S
+++ b/arch/arm/lib/setjmp.S
@@ -34,3 +34,15 @@ ENTRY(longjmp)
ret lr
ENDPROC(longjmp)
.popsection
+
+.pushsection .text.initjmp, "ax"
+ENTRY(initjmp)
+ stm a1, {v1-v8}
+ /* a2: entry point address, a3: stack base, a4: stack size */
+ add a3, a3, a4
+ str a3, [a1, #32] /* where setjmp would save sp */
+ str a2, [a1, #36] /* where setjmp would save lr */
+ mov a1, #0
+ ret lr
+ENDPROC(initjmp)
+.popsection