about summary refs log tree commit diff
path: root/crt/sh/crti.s
diff options
context:
space:
mode:
Diffstat (limited to 'crt/sh/crti.s')
-rw-r--r--crt/sh/crti.s8
1 files changed, 8 insertions, 0 deletions
diff --git a/crt/sh/crti.s b/crt/sh/crti.s
index 0410ab63..d99bfd5c 100644
--- a/crt/sh/crti.s
+++ b/crt/sh/crti.s
@@ -2,12 +2,20 @@
 .global  _init
 .type    _init, @function
 _init:
+	add #-4, r15
+	mov.l r12, @-r15
+	mov.l r14, @-r15
 	sts.l pr, @-r15
+	mov r15, r14
 	nop
 
 .section .fini
 .global  _fini
 .type    _fini, @function
 _fini:
+	add #-4, r15
+	mov.l r12, @-r15
+	mov.l r14, @-r15
 	sts.l pr, @-r15
+	mov r15, r14
 	nop