summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-05-09 19:31:16 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-05-09 19:31:16 +0000
commit60a3cee652d0d07ffd5ded816409769cee5463ea (patch)
tree7dbe7cb0a7e1c38b2f9bfad05cb62c91246e2762 /lib/libc
parent152dc9060b79fadd9adaccf594ec076d4620347e (diff)
assembler versions of insque and remque for m68k, also from 4.4BSD
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/m68k/stdlib/insque.S59
-rw-r--r--lib/libc/arch/m68k/stdlib/remque.S57
-rw-r--r--lib/libc/stdlib/Makefile.inc2
3 files changed, 117 insertions, 1 deletions
diff --git a/lib/libc/arch/m68k/stdlib/insque.S b/lib/libc/arch/m68k/stdlib/insque.S
new file mode 100644
index 00000000000..a14dd4d6250
--- /dev/null
+++ b/lib/libc/arch/m68k/stdlib/insque.S
@@ -0,0 +1,59 @@
+/* $OpenBSD: insque.S,v 1.1 2003/05/09 19:31:15 millert Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * From: "@(#)insque.s 8.1 (Berkeley) 6/4/93"
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .text
+ .asciz "$OpenBSD: insque.S,v 1.1 2003/05/09 19:31:15 millert Exp $"
+#endif /* LIBC_SCCS and not lint */
+
+/* insque(new, pred) */
+
+#include "DEFS.h"
+
+ENTRY(insque)
+ movl sp@(8),a0
+ movl sp@(4),a1
+ movl a0@,a1@
+ movl a0,a1@(4)
+ movl a1,a0@
+ movl a1@,a0
+ movl a1,a0@(4)
+ rts
diff --git a/lib/libc/arch/m68k/stdlib/remque.S b/lib/libc/arch/m68k/stdlib/remque.S
new file mode 100644
index 00000000000..c77bbea7a39
--- /dev/null
+++ b/lib/libc/arch/m68k/stdlib/remque.S
@@ -0,0 +1,57 @@
+/* $OpenBSD: remque.S,v 1.1 2003/05/09 19:31:15 millert Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * From: "@(#)remque.s 8.1 (Berkeley) 6/4/93"
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .text
+ .asciz "$OpenBSD: remque.S,v 1.1 2003/05/09 19:31:15 millert Exp $"
+#endif /* LIBC_SCCS and not lint */
+
+/* remque(entry) */
+
+#include "DEFS.h"
+
+ENTRY(remque)
+ movl sp@(4),a0
+ movl a0@,a1
+ movl a0@(4),a0
+ movl a0,a1@(4)
+ movl a1,a0@
+ rts
diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc
index 4ed97c5b660..bfbbdcb7f43 100644
--- a/lib/libc/stdlib/Makefile.inc
+++ b/lib/libc/stdlib/Makefile.inc
@@ -32,7 +32,7 @@ SRCS+= abs.c div.c labs.c ldiv.c
SRCS+= abs.c div.c labs.c ldiv.c
.endif
-.if (${MACHINE_ARCH} == "vax")
+.if (${MACHINE_ARCH} == "vax") || (${MACHINE_ARCH} == "m68k")
SRCS+= insque.S remque.S
.else
SRCS+= insque.c remque.c