Module Name: src Committed By: macallan Date: Sat Jan 1 01:15:12 UTC 2022
Modified Files: src/sys/arch/powerpc/powerpc: fixup.c Log Message: more KASSERT vs. DIAGNOSTIC fallout To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/powerpc/fixup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/powerpc/fixup.c diff -u src/sys/arch/powerpc/powerpc/fixup.c:1.12 src/sys/arch/powerpc/powerpc/fixup.c:1.13 --- src/sys/arch/powerpc/powerpc/fixup.c:1.12 Mon Jul 6 10:31:24 2020 +++ src/sys/arch/powerpc/powerpc/fixup.c Sat Jan 1 01:15:11 2022 @@ -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 @@ powerpc_fixup_stubs(uint32_t *start, uin 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 @@ powerpc_fixup_stubs(uint32_t *start, uin 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,