about summary refs log tree commit diff
path: root/src/setjmp/ppc/longjmp.S
diff options
context:
space:
mode:
authorRichard Pennington <rich@pennware.com>2012-11-09 23:32:57 +0100
committerrofl0r <retnyg@gmx.net>2012-11-13 18:15:10 +0100
commit7669d1e334e6b96455eece78da43bf830b93d697 (patch)
tree6649acfaa61ec6780498b55fa8015ca4f7a6cdae /src/setjmp/ppc/longjmp.S
parent1e717ea3d2a864e00e507f1a70a892c551955f1b (diff)
downloadmusl-7669d1e334e6b96455eece78da43bf830b93d697.tar.gz
musl-7669d1e334e6b96455eece78da43bf830b93d697.tar.xz
musl-7669d1e334e6b96455eece78da43bf830b93d697.zip
import preliminary ppc work by rdp.
Diffstat (limited to 'src/setjmp/ppc/longjmp.S')
-rw-r--r--src/setjmp/ppc/longjmp.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/setjmp/ppc/longjmp.S b/src/setjmp/ppc/longjmp.S
new file mode 100644
index 00000000..df13c7b1
--- /dev/null
+++ b/src/setjmp/ppc/longjmp.S
@@ -0,0 +1,17 @@
+#include <bits/asm.h>
+        .global _longjmp
+        .global longjmp
+        .type   _longjmp,@function
+        .type   longjmp,@function
+_longjmp:
+longjmp:
+        cmpi    7, 0, r3, 0
+        bne     7, 1f
+        addi    r3, r3, 1
+1:      lmw     r8, 4(r3)               // load r8-r31
+        mr      r6, r4
+        mtlr    r11
+        mtcr    r12
+        mr      r2, r9
+        mr      r1, r10
+        blr