Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Common <arm/reg.h> (and hence common struct reg) fo...



details:   https://anonhg.NetBSD.org/src/rev/521d81d63959
branches:  trunk
changeset: 503683:521d81d63959
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Sun Feb 11 14:51:55 2001 +0000

description:
Common <arm/reg.h> (and hence common struct reg) for ARM.
This is theoretically backward-incompatible on arm26, but GDB doesn't work there
yet anyway.

diffstat:

 sys/arch/arm/include/Makefile          |   4 +-
 sys/arch/arm/include/reg.h             |  54 +++++++++++++++++++++++++++++++++
 sys/arch/arm26/arm26/process_machdep.c |   9 +++--
 sys/arch/arm26/include/reg.h           |  54 +--------------------------------
 sys/arch/arm32/include/reg.h           |  55 +--------------------------------
 5 files changed, 65 insertions(+), 111 deletions(-)

diffs (225 lines):

diff -r a26f73f0b97b -r 521d81d63959 sys/arch/arm/include/Makefile
--- a/sys/arch/arm/include/Makefile     Sun Feb 11 14:46:11 2001 +0000
+++ b/sys/arch/arm/include/Makefile     Sun Feb 11 14:51:55 2001 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile,v 1.6 2001/01/22 22:10:39 bjh21 Exp $
+#      $NetBSD: Makefile,v 1.7 2001/02/11 14:51:55 bjh21 Exp $
 
 KDIR=  /sys/arch/arm/include
 INCSDIR= /usr/include/arm
 
 INCS=  ansi.h aout_machdep.h armreg.h asm.h bswap.h cdefs.h disklabel.h \
        disklabel_acorn.h elf_machdep.h float.h fp.h frame.h ieee.h ieeefp.h \
-       int_types.h limits.h lock.h math.h signal.h setjmp.h stdarg.h \
+       int_types.h limits.h lock.h math.h reg.h signal.h setjmp.h stdarg.h \
        trap.h varargs.h
 
 .include <bsd.kinc.mk>
diff -r a26f73f0b97b -r 521d81d63959 sys/arch/arm/include/reg.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/reg.h        Sun Feb 11 14:51:55 2001 +0000
@@ -0,0 +1,54 @@
+/*     $NetBSD: reg.h,v 1.1 2001/02/11 14:51:55 bjh21 Exp $    */
+
+/*
+ * Copyright (C) 1994, 1995 Frank Lancaster
+ * Copyright (C) 1994, 1995 TooLs GmbH.
+ * 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 TooLs GmbH.
+ * 4. The name of TooLs GmbH may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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.
+ *
+ *     @(#)reg.h       5.5 (Berkeley) 1/18/91
+ */
+
+#ifndef _ARM32_REG_H_
+#define _ARM32_REG_H_
+
+#include <machine/fp.h>
+
+struct reg {
+       unsigned int r[13];
+       unsigned int r_sp;
+       unsigned int r_lr;
+       unsigned int r_pc;
+       unsigned int r_cpsr;
+};
+
+struct fpreg {
+       unsigned int fpr_fpsr;
+       fp_reg_t fpr[8];
+};
+
+#endif /* !_ARM32_REG_H_ */
diff -r a26f73f0b97b -r 521d81d63959 sys/arch/arm26/arm26/process_machdep.c
--- a/sys/arch/arm26/arm26/process_machdep.c    Sun Feb 11 14:46:11 2001 +0000
+++ b/sys/arch/arm26/arm26/process_machdep.c    Sun Feb 11 14:51:55 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: process_machdep.c,v 1.3 2001/02/10 19:09:48 bjh21 Exp $ */
+/* $NetBSD: process_machdep.c,v 1.4 2001/02/11 14:51:56 bjh21 Exp $ */
 /*-
  * Copyright (c) 2000 Ben Harris
  * All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/param.h>
 
-__RCSID("$NetBSD: process_machdep.c,v 1.3 2001/02/10 19:09:48 bjh21 Exp $");
+__RCSID("$NetBSD: process_machdep.c,v 1.4 2001/02/11 14:51:56 bjh21 Exp $");
 
 #include <sys/errno.h>
 #include <sys/proc.h>
@@ -78,9 +78,10 @@
        regs->r[10] = tf->tf_r10;
        regs->r[11] = tf->tf_r11;
        regs->r[12] = tf->tf_r12;
-       regs->r_sp  = tf->tf_r13; /* XXX */
+       regs->r_sp  = tf->tf_r13;
        regs->r_lr  = tf->tf_r14;
-       regs->r_pc  = tf->tf_r15; /* XXX name? */
+       regs->r_pc  = tf->tf_r15;
+       regs->r_cpsr = tf->tf_spsr; /* Always 0 */
        return 0;
 }
 
diff -r a26f73f0b97b -r 521d81d63959 sys/arch/arm26/include/reg.h
--- a/sys/arch/arm26/include/reg.h      Sun Feb 11 14:46:11 2001 +0000
+++ b/sys/arch/arm26/include/reg.h      Sun Feb 11 14:51:55 2001 +0000
@@ -1,53 +1,3 @@
-/* $NetBSD: reg.h,v 1.1 2000/05/09 21:56:00 bjh21 Exp $ */
+/* $NetBSD: reg.h,v 1.2 2001/02/11 14:51:57 bjh21 Exp $ */
 
-/*
- * Copyright (C) 1994, 1995 Frank Lancaster
- * Copyright (C) 1994, 1995 TooLs GmbH.
- * 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 TooLs GmbH.
- * 4. The name of TooLs GmbH may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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.
- *
- *     @(#)reg.h       5.5 (Berkeley) 1/18/91
- */
-
-#ifndef _ARM26_REG_H_
-#define _ARM26_REG_H_
-
-#include <machine/fp.h>
-
-struct reg {
-       unsigned int r[13];
-       unsigned int r_sp;
-       unsigned int r_lr;
-       unsigned int r_pc;
-};
-
-struct fpreg {
-       unsigned int fpr_fpsr;
-       fp_reg_t fpr[8];
-};
-
-#endif /* !_ARM26_REG_H_ */
+#include <arm/reg.h>
diff -r a26f73f0b97b -r 521d81d63959 sys/arch/arm32/include/reg.h
--- a/sys/arch/arm32/include/reg.h      Sun Feb 11 14:46:11 2001 +0000
+++ b/sys/arch/arm32/include/reg.h      Sun Feb 11 14:51:55 2001 +0000
@@ -1,54 +1,3 @@
-/*     $NetBSD: reg.h,v 1.4 1997/10/14 09:20:31 mark Exp $     */
+/*     $NetBSD: reg.h,v 1.5 2001/02/11 14:51:57 bjh21 Exp $    */
 
-/*
- * Copyright (C) 1994, 1995 Frank Lancaster
- * Copyright (C) 1994, 1995 TooLs GmbH.
- * 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 TooLs GmbH.
- * 4. The name of TooLs GmbH may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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.
- *
- *     @(#)reg.h       5.5 (Berkeley) 1/18/91
- */
-
-#ifndef _ARM32_REG_H_
-#define _ARM32_REG_H_
-
-#include <machine/fp.h>
-
-struct reg {
-       unsigned int r[13];
-       unsigned int r_sp;
-       unsigned int r_lr;
-       unsigned int r_pc;
-       unsigned int r_cpsr;
-};
-
-struct fpreg {
-       unsigned int fpr_fpsr;
-       fp_reg_t fpr[8];
-};
-
-#endif /* !_ARM32_REG_H_ */
+#include <arm/reg.h>



Home | Main Index | Thread Index | Old Index