Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/ia64/include Install headers needed for userland bu...



details:   https://anonhg.NetBSD.org/src/rev/9e5dbf5cbbab
branches:  trunk
changeset: 783513:9e5dbf5cbbab
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Dec 26 19:43:09 2012 +0000

description:
Install headers needed for userland build.
Add missing accessors for pthread and TLS support - just dummies for now.

diffstat:

 sys/arch/ia64/include/Makefile   |  10 ++--
 sys/arch/ia64/include/ieee.h     |   3 +
 sys/arch/ia64/include/ieeefp.h   |  73 ++++++++++++++++++++++++++++++++++++++++
 sys/arch/ia64/include/math.h     |   3 +
 sys/arch/ia64/include/mcontext.h |   8 +++-
 sys/arch/ia64/include/profile.h  |  32 +++++++++++++++++
 sys/arch/ia64/include/types.h    |   3 +-
 7 files changed, 125 insertions(+), 7 deletions(-)

diffs (189 lines):

diff -r c04aa46397ef -r 9e5dbf5cbbab sys/arch/ia64/include/Makefile
--- a/sys/arch/ia64/include/Makefile    Wed Dec 26 19:39:26 2012 +0000
+++ b/sys/arch/ia64/include/Makefile    Wed Dec 26 19:43:09 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 2011/07/17 20:54:42 joerg Exp $
+#      $NetBSD: Makefile,v 1.5 2012/12/26 19:43:09 martin Exp $
 
 INCSDIR= /usr/include/ia64
 
@@ -6,11 +6,11 @@
        aout_machdep.h asm.h atomic.h bootinfo.h bswap.h cdefs.h \
        cpu.h cpufunc.h dig64.h disklabel.h efi.h \
        elf_machdep.h endian.h endian_machdep.h float.h fpu.h frame.h \
-       ia64_cpu.h int_const.h int_fmtio.h int_limits.h \
+       ia64_cpu.h ieee.h ieeefp.h int_const.h int_fmtio.h int_limits.h \
        int_mwgwtypes.h int_types.h intr.h intrcnt.h limits.h \
-       loadfile_machdep.h lock.h mca_machdep.h mcontext.h md_var.h \
-       pal.h param.h pcb.h pmap.h proc.h pte.h ptrace.h reg.h sal.h \
-       setjmp.h signal.h smp.h ssc.h types.h \
+       loadfile_machdep.h lock.h math.h mca_machdep.h mcontext.h md_var.h \
+       mutex.h pal.h param.h pcb.h pmap.h proc.h profile.h pte.h ptrace.h \
+       reg.h sal.h rwlock.h setjmp.h signal.h smp.h ssc.h types.h \
        vmparam.h wchar_limits.h
 
 .include <bsd.kinc.mk>
diff -r c04aa46397ef -r 9e5dbf5cbbab sys/arch/ia64/include/ieee.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/ia64/include/ieee.h      Wed Dec 26 19:43:09 2012 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: ieee.h,v 1.1 2012/12/26 19:43:10 martin Exp $ */
+
+#include <sys/ieee754.h>
diff -r c04aa46397ef -r 9e5dbf5cbbab sys/arch/ia64/include/ieeefp.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/ia64/include/ieeefp.h    Wed Dec 26 19:43:09 2012 +0000
@@ -0,0 +1,73 @@
+/* $NetBSD: ieeefp.h,v 1.1 2012/12/26 19:43:10 martin Exp $ */
+
+/*
+ * Written by J.T. Conklin, Apr 28, 1995
+ * Public domain.
+ */
+
+#ifndef _IA64_IEEEFP_H_
+#define _IA64_IEEEFP_H_
+
+#include <sys/featuretest.h>
+
+#if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
+
+typedef int fenv_t;
+typedef int fexcept_t;
+
+#define        FE_INVALID      0x01    /* invalid operation exception */
+#define        FE_DIVBYZERO    0x02    /* divide-by-zero exception */
+#define        FE_OVERFLOW     0x04    /* overflow exception */
+#define        FE_UNDERFLOW    0x08    /* underflow exception */
+#define        FE_INEXACT      0x10    /* imprecise (loss of precision; "inexact") */
+#define        FE_IOVERFLOW    0x20    /* integer overflow */
+
+#define        FE_ALL_EXCEPT   0x3f
+
+/*
+ * These bits match the fpcr as well as bits 12:11
+ * in fp operate instructions
+ */
+#define        FE_TOWARDZERO   0       /* round to zero (truncate) */
+#define        FE_DOWNWARD     1       /* round toward negative infinity */
+#define        FE_TONEAREST    2       /* round to nearest representable number */
+#define        FE_UPWARD       3       /* round toward positive infinity */
+
+#if !defined(_ISOC99_SOURCE)
+
+typedef int fp_except;
+
+#define        FP_X_INV        FE_INVALID      /* invalid operation exception */
+#define        FP_X_DZ         FE_DIVBYZERO    /* divide-by-zero exception */
+#define        FP_X_OFL        FE_OVERFLOW     /* overflow exception */
+#define        FP_X_UFL        FE_UNDERFLOW    /* underflow exception */
+#define        FP_X_IMP        FE_INEXACT      /* imprecise (prec. loss; "inexact") */
+#define        FP_X_IOV        FE_IOVERFLOW    /* integer overflow */
+
+/*
+ * fp_rnd bits match the fpcr, below, as well as bits 12:11
+ * in fp operate instructions
+ */
+typedef enum {
+    FP_RZ = FE_TOWARDZERO,     /* round to zero (truncate) */
+    FP_RM = FE_DOWNWARD,       /* round toward negative infinity */
+    FP_RN = FE_TONEAREST,      /* round to nearest representable number */
+    FP_RP = FE_UPWARD,         /* round toward positive infinity */
+    _FP_DYNAMIC=FP_RP
+} fp_rnd;
+
+#endif /* !_ISOC99_SOURCE */
+
+#endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */
+
+#endif /* _IA64_IEEEFP_H_ */
+
+
+
+
+
+
+
+
+
+
diff -r c04aa46397ef -r 9e5dbf5cbbab sys/arch/ia64/include/math.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/ia64/include/math.h      Wed Dec 26 19:43:09 2012 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: math.h,v 1.1 2012/12/26 19:43:10 martin Exp $  */
+
+#define        __HAVE_NANF
diff -r c04aa46397ef -r 9e5dbf5cbbab sys/arch/ia64/include/mcontext.h
--- a/sys/arch/ia64/include/mcontext.h  Wed Dec 26 19:39:26 2012 +0000
+++ b/sys/arch/ia64/include/mcontext.h  Wed Dec 26 19:43:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcontext.h,v 1.2 2008/04/28 20:23:25 martin Exp $      */
+/*     $NetBSD: mcontext.h,v 1.3 2012/12/26 19:43:10 martin Exp $      */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -95,4 +95,10 @@
 #define _UC_MACHINE_SP(uc)     ((uc)->uc_mcontext.mc_special.sp)
 #endif
 
+static __inline void *
+__lwp_getprivate_fast(void)
+{
+       return (void*)0;
+}
+
 #endif /* !_IA64_MCONTEXT_H_ */
diff -r c04aa46397ef -r 9e5dbf5cbbab sys/arch/ia64/include/profile.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/ia64/include/profile.h   Wed Dec 26 19:43:09 2012 +0000
@@ -0,0 +1,32 @@
+/* $NetBSD: profile.h,v 1.1 2012/12/26 19:43:10 martin Exp $ */
+
+/*
+ * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution%CS.CMU.EDU@localhost
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+
+#define        _MCOUNT_DECL    void mcount
+#define        _MCOUNT_FUNC    mcount
diff -r c04aa46397ef -r 9e5dbf5cbbab sys/arch/ia64/include/types.h
--- a/sys/arch/ia64/include/types.h     Wed Dec 26 19:39:26 2012 +0000
+++ b/sys/arch/ia64/include/types.h     Wed Dec 26 19:43:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.6 2011/10/01 15:59:28 chs Exp $    */
+/*     $NetBSD: types.h,v 1.7 2012/12/26 19:43:10 martin Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -75,6 +75,7 @@
 #define        __HAVE_OLD_DISKLABEL
 #define        __HAVE_ATOMIC64_OPS
 /* XXX: #define        __HAVE_CPU_MAXPROC */
+#define        __HAVE_TLS_VARIANT_I
 
 #if defined(_KERNEL)
 #define __HAVE_RAS



Home | Main Index | Thread Index | Old Index