summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscole <scole@NetBSD.org>2016-08-05 16:40:47 +0000
committerscole <scole@NetBSD.org>2016-08-05 16:40:47 +0000
commit7563caafdf4e50673db731663f98380d62853b60 (patch)
tree477f9441f652f03b93e0b9a78b0a68dccbda656e
parentea814ef12899a87c36d226146c24dc5138d0619c (diff)
PR port-ia64/51261
Add stubs for ia64 build
-rw-r--r--lib/libc/arch/ia64/gen/Makefile.inc5
-rw-r--r--lib/libc/arch/ia64/gen/fpgetsticky.c41
-rw-r--r--lib/libc/arch/ia64/gen/fpsetsticky.c41
-rw-r--r--lib/libc/arch/ia64/gen/getcontext.S40
-rw-r--r--lib/libc/arch/ia64/gen/makecontext.c45
-rw-r--r--lib/libc/arch/ia64/gen/swapcontext.S37
-rw-r--r--lib/libc/arch/ia64/sys/__clone.S43
-rw-r--r--lib/libc/arch/ia64/sys/ptrace.S37
8 files changed, 284 insertions, 5 deletions
diff --git a/lib/libc/arch/ia64/gen/Makefile.inc b/lib/libc/arch/ia64/gen/Makefile.inc
index cafdb078f81..01b357d7382 100644
--- a/lib/libc/arch/ia64/gen/Makefile.inc
+++ b/lib/libc/arch/ia64/gen/Makefile.inc
@@ -1,10 +1,13 @@
-# $NetBSD: Makefile.inc,v 1.7 2016/06/30 09:14:30 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.8 2016/08/05 16:40:47 scole Exp $
SRCS+= _lwp.c
SRCS+= bswap16.c bswap32.c bswap64.c
SRCS+= setjmp.S _setjmp.S sigsetjmp.S
SRCS+= flt_rounds.c fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c
+SRCS+= fpgetsticky.c fpsetsticky.c
+SRCS+= getcontext.S makecontext.c swapcontext.S
+
# Common ieee754 constants and functions
SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c
SRCS+= fpclassifyf_ieee754.c fpclassifyd_ieee754.c
diff --git a/lib/libc/arch/ia64/gen/fpgetsticky.c b/lib/libc/arch/ia64/gen/fpgetsticky.c
new file mode 100644
index 00000000000..6b9f0f7f7bf
--- /dev/null
+++ b/lib/libc/arch/ia64/gen/fpgetsticky.c
@@ -0,0 +1,41 @@
+/* $NetBSD: fpgetsticky.c,v 1.1 2016/08/05 16:40:47 scole Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include <sys/cdefs.h>
+
+#include <sys/types.h>
+#include <ieeefp.h>
+
+fp_except_t
+fpgetsticky(void)
+{
+ /* XXX implement, pause in ski */
+ __asm __volatile("break.i 0");
+
+ return (fp_except_t)0;
+}
diff --git a/lib/libc/arch/ia64/gen/fpsetsticky.c b/lib/libc/arch/ia64/gen/fpsetsticky.c
new file mode 100644
index 00000000000..daac9398306
--- /dev/null
+++ b/lib/libc/arch/ia64/gen/fpsetsticky.c
@@ -0,0 +1,41 @@
+/* $NetBSD: fpsetsticky.c,v 1.1 2016/08/05 16:40:47 scole Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include <sys/cdefs.h>
+
+#include <sys/types.h>
+#include <ieeefp.h>
+
+fp_except_t
+fpsetsticky(fp_except_t sticky)
+{
+ /* XXX implement, pause in ski */
+ __asm __volatile("break.i 0");
+
+ return (fp_except_t)0;
+}
diff --git a/lib/libc/arch/ia64/gen/getcontext.S b/lib/libc/arch/ia64/gen/getcontext.S
new file mode 100644
index 00000000000..a48c89d8603
--- /dev/null
+++ b/lib/libc/arch/ia64/gen/getcontext.S
@@ -0,0 +1,40 @@
+/* $NetBSD: getcontext.S,v 1.1 2016/08/05 16:40:47 scole Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include "SYS.h"
+
+#ifdef WEAK_ALIAS
+WEAK_ALIAS(getcontext, _getcontext)
+#endif
+
+ENTRY(_getcontext,0)
+
+ /* XXX implement, halt in ski */
+ break.i 0
+
+END(_getcontext)
diff --git a/lib/libc/arch/ia64/gen/makecontext.c b/lib/libc/arch/ia64/gen/makecontext.c
new file mode 100644
index 00000000000..54ac498eed1
--- /dev/null
+++ b/lib/libc/arch/ia64/gen/makecontext.c
@@ -0,0 +1,45 @@
+/* $NetBSD: makecontext.c,v 1.1 2016/08/05 16:40:47 scole Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include <inttypes.h>
+#include <stddef.h>
+#include <ucontext.h>
+#include "extern.h"
+
+#if __STDC__
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+void
+makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
+{
+ /* XXX implement, halt in ski */
+ __asm __volatile("break.i 0");
+}
diff --git a/lib/libc/arch/ia64/gen/swapcontext.S b/lib/libc/arch/ia64/gen/swapcontext.S
new file mode 100644
index 00000000000..6e8a5efd7b2
--- /dev/null
+++ b/lib/libc/arch/ia64/gen/swapcontext.S
@@ -0,0 +1,37 @@
+/* $NetBSD: swapcontext.S,v 1.1 2016/08/05 16:40:47 scole Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include "SYS.h"
+
+ENTRY(swapcontext,0)
+
+ /* XXX implement, halt in ski */
+ break.i 0
+
+END(swapcontext)
+
diff --git a/lib/libc/arch/ia64/sys/__clone.S b/lib/libc/arch/ia64/sys/__clone.S
index a62702e144b..50ca07546f4 100644
--- a/lib/libc/arch/ia64/sys/__clone.S
+++ b/lib/libc/arch/ia64/sys/__clone.S
@@ -1,3 +1,42 @@
-/* $NetBSD: __clone.S,v 1.1 2006/09/10 21:22:34 cherry Exp $ */
+/* $NetBSD: __clone.S,v 1.2 2016/08/05 16:40:47 scole Exp $ */
+
+/*-
+ * Copyright (c) 2006,2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+/* XXX: Stub */
+#include <sys/errno.h>
+
+#include "SYS.h"
+
+#ifdef WEAK_ALIAS
+WEAK_ALIAS(clone, __clone)
+#endif
+
+ENTRY(__clone,4)
+ /* XXX implement, break in ski*/
+ break.i 0
-/* XXX: Stub */ \ No newline at end of file
+END(__clone)
diff --git a/lib/libc/arch/ia64/sys/ptrace.S b/lib/libc/arch/ia64/sys/ptrace.S
index bea78b23aef..e9a42fff06e 100644
--- a/lib/libc/arch/ia64/sys/ptrace.S
+++ b/lib/libc/arch/ia64/sys/ptrace.S
@@ -1,3 +1,36 @@
-/* $NetBSD: ptrace.S,v 1.1 2006/09/10 21:22:34 cherry Exp $ */
+/* $NetBSD: ptrace.S,v 1.2 2016/08/05 16:40:47 scole Exp $ */
-/* XXX: Stub */ \ No newline at end of file
+/*-
+ * Copyright (c) 2006,2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+/* XXX: Stub */
+#include "SYS.h"
+
+ENTRY(ptrace,0)
+ /* XXX implement, halt in ski */
+ break.i 0
+
+END(ptrace)