Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc move DIAGNOSTIC only variable insid...
details: https://anonhg.NetBSD.org/src/rev/401a16c50ed1
branches: trunk
changeset: 791171:401a16c50ed1
user: nisimura <nisimura%NetBSD.org@localhost>
date: Thu Nov 07 15:26:36 2013 +0000
description:
move DIAGNOSTIC only variable inside #ifdef
diffstat:
sys/arch/powerpc/powerpc/fixup.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 024f435e0bbf -r 401a16c50ed1 sys/arch/powerpc/powerpc/fixup.c
--- a/sys/arch/powerpc/powerpc/fixup.c Thu Nov 07 14:51:36 2013 +0000
+++ b/sys/arch/powerpc/powerpc/fixup.c Thu Nov 07 15:26:36 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fixup.c,v 1.5 2011/07/01 23:47:09 matt Exp $ */
+/* $NetBSD: fixup.c,v 1.6 2013/11/07 15:26:36 nisimura Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fixup.c,v 1.5 2011/07/01 23:47:09 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fixup.c,v 1.6 2013/11/07 15:26:36 nisimura Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -104,7 +104,9 @@
register_t fixreg[32];
register_t ctr = 0;
uint32_t valid_mask = (1 << 1);
+#ifdef DIAGNOSTIC
int r_lr = -1;
+#endif
for (; stub < stub_end && fixup.jfi_real == 0; stub++) {
const union instr i = { .i_int = *stub };
@@ -120,9 +122,9 @@
#ifdef DIAGNOSTIC
const u_int spr = (rb << 5) | ra;
KASSERT(spr == SPR_LR);
+ r_lr = rs;
#endif
valid_mask |= (1 << rs);
- r_lr = rs;
break;
}
case OPC31_MTSPR: {
Home |
Main Index |
Thread Index |
Old Index