Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/include Header files which don't differ between...



details:   https://anonhg.NetBSD.org/src/rev/d6b5c715fcbd
branches:  trunk
changeset: 502025:d6b5c715fcbd
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Wed Jan 10 19:02:05 2001 +0000

description:
Header files which don't differ between arm32 and arm26 and can thus be
shared.

diffstat:

 sys/arch/arm/include/ansi.h            |   94 ++++++++++++++++++++
 sys/arch/arm/include/aout_machdep.h    |   59 ++++++++++++
 sys/arch/arm/include/asm.h             |  118 +++++++++++++++++++++++++
 sys/arch/arm/include/bswap.h           |    9 +
 sys/arch/arm/include/cdefs.h           |    8 +
 sys/arch/arm/include/disklabel.h       |   84 ++++++++++++++++++
 sys/arch/arm/include/disklabel_acorn.h |  121 ++++++++++++++++++++++++++
 sys/arch/arm/include/endian.h          |    3 +
 sys/arch/arm/include/endian_machdep.h  |    3 +
 sys/arch/arm/include/float.h           |   89 +++++++++++++++++++
 sys/arch/arm/include/fp.h              |   86 ++++++++++++++++++
 sys/arch/arm/include/ieee.h            |  150 +++++++++++++++++++++++++++++++++
 sys/arch/arm/include/ieeefp.h          |   40 ++++++++
 sys/arch/arm/include/int_types.h       |   68 ++++++++++++++
 sys/arch/arm/include/limits.h          |   97 +++++++++++++++++++++
 sys/arch/arm/include/lock.h            |   51 +++++++++++
 sys/arch/arm/include/math.h            |   11 ++
 sys/arch/arm/include/setjmp.h          |   82 ++++++++++++++++++
 sys/arch/arm/include/stdarg.h          |   73 ++++++++++++++++
 sys/arch/arm/include/trap.h            |   58 ++++++++++++
 sys/arch/arm/include/varargs.h         |   63 +++++++++++++
 21 files changed, 1367 insertions(+), 0 deletions(-)

diffs (truncated from 1451 to 300 lines):

diff -r ca79bac91b5a -r d6b5c715fcbd sys/arch/arm/include/ansi.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/ansi.h       Wed Jan 10 19:02:05 2001 +0000
@@ -0,0 +1,94 @@
+/*     $NetBSD: ansi.h,v 1.1 2001/01/10 19:02:05 bjh21 Exp $   */
+
+/*
+ * Copyright (c) 1990, 1993
+ *     The Regents of the University of California.  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.
+ * 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: @(#)ansi.h        8.2 (Berkeley) 1/4/94
+ */
+
+#ifndef        _ANSI_H_
+#define        _ANSI_H_
+
+#include <machine/int_types.h>
+
+/*
+ * Types which are fundamental to the implementation and may appear in
+ * more than one standard header are defined here.  Standard headers
+ * then use:
+ *     #ifdef  _BSD_SIZE_T_
+ *     typedef _BSD_SIZE_T_ size_t;
+ *     #undef  _BSD_SIZE_T_
+ *     #endif
+ */
+#define        _BSD_CLOCK_T_           unsigned long   /* clock() */
+#define        _BSD_PTRDIFF_T_         int             /* ptr1 - ptr2 */
+#define        _BSD_SIZE_T_            unsigned int    /* sizeof() */
+#define        _BSD_SSIZE_T_           int             /* byte count or error */
+#define        _BSD_TIME_T_            long            /* time() */
+#define        _BSD_VA_LIST_           char *          /* va_list */
+#define        _BSD_CLOCKID_T_         int             /* clockid_t */
+#define        _BSD_TIMER_T_           int             /* timer_t */
+#define        _BSD_SUSECONDS_T_       int             /* suseconds_t */
+#define        _BSD_USECONDS_T_        unsigned int    /* useconds_t */
+
+/*
+ * NOTE: rune_t is not covered by ANSI nor other standards, and should not
+ * be instantiated outside of lib/libc/locale.  use wchar_t.
+ *
+ * Runes (wchar_t) is declared to be an ``int'' instead of the more natural
+ * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
+ * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
+ * it looks like 10646 will be a 31 bit standard.  This means that if your
+ * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
+ * chosen over a long is that the is*() and to*() routines take ints (says
+ * ANSI C), but they use _RUNE_T_ instead of int.  By changing it here, you
+ * lose a bit of ANSI conformance, but your programs will still work.
+ *    
+ * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type.  When wchar_t
+ * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
+ * defined for ctype.h.
+ */
+#define        _BSD_WCHAR_T_           int             /* wchar_t */
+#define        _BSD_WINT_T_            int             /* wint_t */
+#define        _BSD_RUNE_T_            int             /* rune_t */
+
+/*
+ * mbstate_t is an opaque object to keep conversion state, during multibyte
+ * stream conversions.  The content must not be referenced by user programs.
+ */
+typedef union {
+       char __mbstate8[128];
+       __int64_t __mbstateL;   /* for alignment */
+} __mbstate_t;
+#define        _BSD_MBSTATE_T_         __mbstate_t     /* mbstate_t */
+
+#endif /* _ANSI_H_ */
diff -r ca79bac91b5a -r d6b5c715fcbd sys/arch/arm/include/aout_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/aout_machdep.h       Wed Jan 10 19:02:05 2001 +0000
@@ -0,0 +1,59 @@
+/*     $NetBSD: aout_machdep.h,v 1.1 2001/01/10 19:02:05 bjh21 Exp $   */
+
+/*
+ * Copyright (c) 1994-1996 Mark Brinicombe.
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by Mark Brinicombe
+ * 4. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#ifndef        _ARM32_AOUT_MACHDEP_H_
+#define        _ARM32_AOUT_MACHDEP_H_
+
+#define        __LDPGSZ        4096
+
+/* Relocation format. */
+
+struct relocation_info_arm6 {
+       int r_address;          /* offset in text or data segment */
+       unsigned r_symbolnum:24;/* ordinal number of add symbol */
+       unsigned r_pcrel:1;     /* 1 if value should be pc-relative */
+       unsigned r_length:2;    /* 0=byte, 1=word, 2=long, 3=24bits shifted by 2 */
+       unsigned r_extern:1;    /* 1 if need to add symbol to value */
+       unsigned r_neg:1;       /* 1 if addend is negative */
+       unsigned r_baserel:1;   /* 1 if linkage table relative */
+       unsigned r_jmptable:1;  /* 1 if relocation to jump table */
+       unsigned r_relative:1;  /* 1 if load address relative */
+};
+
+#define relocation_info relocation_info_arm6
+                                                                                                                                                                                       
+/* No special executable format */
+#define        cpu_exec_aout_makecmds(a, b)    ENOEXEC
+
+#endif /* _ARM32_AOUT_MACHDEP_H_ */
diff -r ca79bac91b5a -r d6b5c715fcbd sys/arch/arm/include/asm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/asm.h        Wed Jan 10 19:02:05 2001 +0000
@@ -0,0 +1,118 @@
+/*     $NetBSD: asm.h,v 1.1 2001/01/10 19:02:05 bjh21 Exp $    */
+
+/*
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * William Jolitz.
+ *
+ * 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: @(#)asm.h 5.5 (Berkeley) 5/7/91
+ */
+
+#ifndef _ARM32_ASM_H_
+#define _ARM32_ASM_H_
+
+#ifdef __ELF__
+# define _C_LABEL(x)   x
+#else
+# ifdef __STDC__
+#  define _C_LABEL(x)  _ ## x
+# else
+#  define _C_LABEL(x)  _/**/x
+# endif
+#endif
+#define        _ASM_LABEL(x)   x
+
+#ifdef __STDC__
+# define __CONCAT(x,y) x ## y
+# define __STRING(x)   #x
+#else
+# define __CONCAT(x,y) x/**/y
+# define __STRING(x)   "x"
+#endif
+
+#ifndef _ALIGN_TEXT
+# define _ALIGN_TEXT .align 0
+#endif
+
+/*
+ * gas/arm uses @ as a single comment character and thus cannot be used here
+ * Instead it recognised the # instead of an @ symbols in .type directives
+ * We define a couple of macros so that assembly code will not be dependant
+ * on one or the other.
+ */
+#define _ASM_TYPE_FUNCTION     #function
+#define _ASM_TYPE_OBJECT       #object
+#define _ENTRY(x) \
+       .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x:
+
+#ifdef GPROF
+# define _PROF_PROLOGUE        \
+       mov ip,lr; bl mcount
+#else
+# define _PROF_PROLOGUE
+#endif
+
+#define        ENTRY(y)        _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
+#define        ENTRY_NP(y)     _ENTRY(_C_LABEL(y))
+#define        ASENTRY(y)      _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
+#define        ASENTRY_NP(y)   _ENTRY(_ASM_LABEL(y))
+
+#define        ASMSTR          .asciz
+
+#ifdef __ELF__
+#define RCSID(x)       .section ".ident"; .asciz x
+#else
+#define RCSID(x)       .text; .asciz x
+#endif
+
+#ifdef __ELF__
+#define        WEAK_ALIAS(alias,sym)                                           \
+       .weak alias;                                                    \
+       alias = sym
+#endif
+
+#ifdef __STDC__
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .stabs msg ## ,30,0,0,0 ;                                       \
+       .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0
+#elif defined(__ELF__)
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .stabs msg,30,0,0,0 ;                                           \
+       .stabs __STRING(sym),1,0,0,0
+#else
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .stabs msg,30,0,0,0 ;                                           \
+       .stabs __STRING(_/**/sym),1,0,0,0
+#endif /* __STDC__ */
+
+#endif /* !_ARM_ASM_H_ */
diff -r ca79bac91b5a -r d6b5c715fcbd sys/arch/arm/include/bswap.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/bswap.h      Wed Jan 10 19:02:05 2001 +0000
@@ -0,0 +1,9 @@
+/*      $NetBSD: bswap.h,v 1.1 2001/01/10 19:02:05 bjh21 Exp $      */
+
+#ifndef _MACHINE_BSWAP_H_
+#define        _MACHINE_BSWAP_H_
+
+#define __BSWAP_RENAME
+#include <sys/bswap.h>
+
+#endif /* !_MACHINE_BSWAP_H_ */
diff -r ca79bac91b5a -r d6b5c715fcbd sys/arch/arm/include/cdefs.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/cdefs.h      Wed Jan 10 19:02:05 2001 +0000
@@ -0,0 +1,8 @@



Home | Main Index | Thread Index | Old Index