Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/ia64 PR port-ia64/51261



details:   https://anonhg.NetBSD.org/src/rev/c06ba6c9fb0a
branches:  trunk
changeset: 346871:c06ba6c9fb0a
user:      scole <scole%NetBSD.org@localhost>
date:      Fri Aug 05 16:40:47 2016 +0000

description:
PR port-ia64/51261

Add stubs for ia64 build

diffstat:

 lib/libc/arch/ia64/gen/Makefile.inc  |   5 +++-
 lib/libc/arch/ia64/gen/fpgetsticky.c |  41 ++++++++++++++++++++++++++++++++
 lib/libc/arch/ia64/gen/fpsetsticky.c |  41 ++++++++++++++++++++++++++++++++
 lib/libc/arch/ia64/gen/getcontext.S  |  40 ++++++++++++++++++++++++++++++++
 lib/libc/arch/ia64/gen/makecontext.c |  45 ++++++++++++++++++++++++++++++++++++
 lib/libc/arch/ia64/gen/swapcontext.S |  37 +++++++++++++++++++++++++++++
 lib/libc/arch/ia64/sys/__clone.S     |  43 ++++++++++++++++++++++++++++++++-
 lib/libc/arch/ia64/sys/ptrace.S      |  37 ++++++++++++++++++++++++++++-
 8 files changed, 284 insertions(+), 5 deletions(-)

diffs (truncated from 334 to 300 lines):

diff -r 00ea4f7a37d5 -r c06ba6c9fb0a lib/libc/arch/ia64/gen/Makefile.inc
--- a/lib/libc/arch/ia64/gen/Makefile.inc       Fri Aug 05 16:25:18 2016 +0000
+++ b/lib/libc/arch/ia64/gen/Makefile.inc       Fri Aug 05 16:40:47 2016 +0000
@@ -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 -r 00ea4f7a37d5 -r c06ba6c9fb0a lib/libc/arch/ia64/gen/fpgetsticky.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/ia64/gen/fpgetsticky.c      Fri Aug 05 16:40:47 2016 +0000
@@ -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 -r 00ea4f7a37d5 -r c06ba6c9fb0a lib/libc/arch/ia64/gen/fpsetsticky.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/ia64/gen/fpsetsticky.c      Fri Aug 05 16:40:47 2016 +0000
@@ -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 -r 00ea4f7a37d5 -r c06ba6c9fb0a lib/libc/arch/ia64/gen/getcontext.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/ia64/gen/getcontext.S       Fri Aug 05 16:40:47 2016 +0000
@@ -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 -r 00ea4f7a37d5 -r c06ba6c9fb0a lib/libc/arch/ia64/gen/makecontext.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/ia64/gen/makecontext.c      Fri Aug 05 16:40:47 2016 +0000
@@ -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 -r 00ea4f7a37d5 -r c06ba6c9fb0a lib/libc/arch/ia64/gen/swapcontext.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/ia64/gen/swapcontext.S      Fri Aug 05 16:40:47 2016 +0000
@@ -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 -r 00ea4f7a37d5 -r c06ba6c9fb0a lib/libc/arch/ia64/sys/__clone.S
--- a/lib/libc/arch/ia64/sys/__clone.S  Fri Aug 05 16:25:18 2016 +0000
+++ b/lib/libc/arch/ia64/sys/__clone.S  Fri Aug 05 16:40:47 2016 +0000
@@ -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 -r 00ea4f7a37d5 -r c06ba6c9fb0a lib/libc/arch/ia64/sys/ptrace.S
--- a/lib/libc/arch/ia64/sys/ptrace.S   Fri Aug 05 16:25:18 2016 +0000
+++ b/lib/libc/arch/ia64/sys/ptrace.S   Fri Aug 05 16:40:47 2016 +0000
@@ -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



Home | Main Index | Thread Index | Old Index