about summary refs log tree commit diff
path: root/src/signal/m68k
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-06-14 14:26:30 -0400
committerRich Felker <dalias@aerifal.cx>2018-06-19 13:24:05 -0400
commitf81e44a0d96c88e052e51982f9fdd6fe0a212b46 (patch)
treee8a21317b5af5a2d09543ffcb0fbf1f0a668b63a /src/signal/m68k
parent18f02c42a2b5397e8541f4663eb6ca00c1a806dd (diff)
downloadmusl-f81e44a0d96c88e052e51982f9fdd6fe0a212b46.tar.gz
musl-f81e44a0d96c88e052e51982f9fdd6fe0a212b46.tar.xz
musl-f81e44a0d96c88e052e51982f9fdd6fe0a212b46.zip
add m68k port
three ABIs are supported: the default with 68881 80-bit fpu format and
results returned in floating point registers, softfloat-only with the
same format, and coldfire fpu with IEEE single/double only. only the
first is tested at all, and only under qemu which has fpu emulation
bugs.

basic functionality smoke tests have been performed for the most
common arch-specific breakage via libc-test and qemu user-level
emulation. some sysvipc failures remain, but are shared with other big
endian archs and will be fixed separately.
Diffstat (limited to 'src/signal/m68k')
-rw-r--r--src/signal/m68k/sigsetjmp.s29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/signal/m68k/sigsetjmp.s b/src/signal/m68k/sigsetjmp.s
new file mode 100644
index 00000000..09bfa646
--- /dev/null
+++ b/src/signal/m68k/sigsetjmp.s
@@ -0,0 +1,29 @@
+.global sigsetjmp
+.global __sigsetjmp
+.type sigsetjmp,@function
+.type __sigsetjmp,@function
+sigsetjmp:
+__sigsetjmp:
+	move.l 8(%sp),%d0
+	beq 1f
+
+	movea.l 4(%sp),%a1
+	move.l (%sp)+,156(%a1)
+	move.l %a2,156+4+8(%a1)
+	movea.l %a1,%a2
+
+.hidden ___setjmp
+	lea ___setjmp-.-8,%a1
+	jsr (%pc,%a1)
+
+	move.l 156(%a2),-(%sp)
+	move.l %a2,4(%sp)
+	move.l %d0,8(%sp)
+	movea.l 156+4+8(%a2),%a2
+
+.hidden __sigsetjmp_tail
+	lea __sigsetjmp_tail-.-8,%a1
+	jmp (%pc,%a1)
+
+1:	lea ___setjmp-.-8,%a1
+	jmp (%pc,%a1)