about summary refs log tree commit diff
path: root/src/setjmp/superh/longjmp.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/setjmp/superh/longjmp.s')
-rw-r--r--src/setjmp/superh/longjmp.s26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/setjmp/superh/longjmp.s b/src/setjmp/superh/longjmp.s
new file mode 100644
index 00000000..e9aa4e50
--- /dev/null
+++ b/src/setjmp/superh/longjmp.s
@@ -0,0 +1,26 @@
+.global _longjmp
+.global longjmp
+.type   _longjmp, @function
+.type   longjmp,  @function
+_longjmp:
+longjmp:
+	mov.l  @r4+, r8
+	mov.l  @r4+, r9
+	mov.l  @r4+, r10
+	mov.l  @r4+, r11
+	mov.l  @r4+, r12
+	mov.l  @r4+, r13
+	mov.l  @r4+, r14
+	mov.l  @r4+, r15
+	lds.l  @r4+, pr
+	fmov.s @r4+, fr12
+	fmov.s @r4+, fr13
+	fmov.s @r4+, fr14
+	fmov.s @r4+, fr15
+
+	tst  r5, r5
+	movt r0
+	add  r5, r0
+
+	rts
+	 nop