summaryrefslogtreecommitdiff
path: root/src/setjmp
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2016-11-11 21:52:05 -0600
committerRich Felker <dalias@aerifal.cx>2016-11-11 23:06:21 -0500
commit15094943050eb9a564f409323070e50b40f78816 (patch)
treef9af42d3369ee9a6ebd08bf416a99159193217a8 /src/setjmp
parent54482898abe8d6d937ee67ea5974cd8eae859c37 (diff)
downloadmusl-15094943050eb9a564f409323070e50b40f78816.tar.gz
musl-15094943050eb9a564f409323070e50b40f78816.tar.bz2
musl-15094943050eb9a564f409323070e50b40f78816.tar.xz
musl-15094943050eb9a564f409323070e50b40f78816.zip
add s390x port
Diffstat (limited to 'src/setjmp')
-rw-r--r--src/setjmp/s390x/longjmp.s23
-rw-r--r--src/setjmp/s390x/setjmp.s25
2 files changed, 48 insertions, 0 deletions
diff --git a/src/setjmp/s390x/longjmp.s b/src/setjmp/s390x/longjmp.s
new file mode 100644
index 00000000..b2310f8a
--- /dev/null
+++ b/src/setjmp/s390x/longjmp.s
@@ -0,0 +1,23 @@
+ .global _longjmp
+ .global longjmp
+ .type _longjmp,@function
+ .type longjmp,@function
+_longjmp:
+longjmp:
+
+1:
+ lmg %r6, %r15, 0(%r2)
+
+ ld %f8, 10*8(%r2)
+ ld %f9, 11*8(%r2)
+ ld %f10, 12*8(%r2)
+ ld %f11, 13*8(%r2)
+ ld %f12, 14*8(%r2)
+ ld %f13, 15*8(%r2)
+ ld %f14, 16*8(%r2)
+ ld %f15, 17*8(%r2)
+
+ ltgr %r2, %r3
+ bnzr %r14
+ lhi %r2, 1
+ br %r14
diff --git a/src/setjmp/s390x/setjmp.s b/src/setjmp/s390x/setjmp.s
new file mode 100644
index 00000000..afae1b67
--- /dev/null
+++ b/src/setjmp/s390x/setjmp.s
@@ -0,0 +1,25 @@
+ .global ___setjmp
+ .hidden ___setjmp
+ .global __setjmp
+ .global _setjmp
+ .global setjmp
+ .type __setjmp,@function
+ .type _setjmp,@function
+ .type setjmp,@function
+___setjmp:
+__setjmp:
+_setjmp:
+setjmp:
+ stmg %r6, %r15, 0(%r2)
+
+ std %f8, 10*8(%r2)
+ std %f9, 11*8(%r2)
+ std %f10, 12*8(%r2)
+ std %f11, 13*8(%r2)
+ std %f12, 14*8(%r2)
+ std %f13, 15*8(%r2)
+ std %f14, 16*8(%r2)
+ std %f15, 17*8(%r2)
+
+ lghi %r2, 0
+ br %r14