Source-Changes-HG archive

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

[.joined/src/trunk]: .joined/src/sys/arch/powerpc/powerpc more KASSERT vs. DI...



details:   https://anonhg.NetBSD.org/.joined/src/rev/70f3aac13960
branches:  trunk
changeset: 359366:70f3aac13960
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sat Jan 01 01:15:11 2022 +0000

description:
more KASSERT vs. DIAGNOSTIC fallout

diffstat:

 sys/arch/powerpc/powerpc/fixup.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 8256fcbd6389 -r 70f3aac13960 sys/arch/powerpc/powerpc/fixup.c
--- a/sys/arch/powerpc/powerpc/fixup.c  Sat Jan 01 01:03:50 2022 +0000
+++ b/sys/arch/powerpc/powerpc/fixup.c  Sat Jan 01 01:15:11 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fixup.c,v 1.12 2020/07/06 10:31:24 rin Exp $   */
+/*     $NetBSD: fixup.c,v 1.13 2022/01/01 01:15:11 macallan Exp $      */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fixup.c,v 1.12 2020/07/06 10:31:24 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fixup.c,v 1.13 2022/01/01 01:15:11 macallan Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ppcarch.h"
@@ -186,7 +186,9 @@
                                break;
                        }
                        case OPC_STW: {
+#ifdef DIAGNOSTIC
                                KASSERT((i.i_d.i_rs == r_lr || i.i_d.i_rs == 31) && i.i_d.i_ra == 1);
+#endif
                                break;
                        }
                        case OPC_STWU: {
@@ -195,8 +197,10 @@
                                break;
                        }
                        case OPC_branch_19: {
+#ifdef DIAGNOSTIC
                                KASSERT(r_lr == -1 || i.i_int == 0x4e800421);
                                KASSERT(r_lr != -1 || i.i_int == 0x4e800420);
+#endif
                                if (ctr == 0) {
                                        panic("%s: jump at %p to %p would "
                                            "branch to 0", __func__, insnp,



Home | Main Index | Thread Index | Old Index