Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Left-shift of negative values is UB.
details: https://anonhg.NetBSD.org/src/rev/17a1e33d3c78
branches: trunk
changeset: 341884:17a1e33d3c78
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Nov 27 13:51:24 2015 +0000
description:
Left-shift of negative values is UB.
diffstat:
sys/arch/sparc64/sparc64/pmap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ce76c0ed820f -r 17a1e33d3c78 sys/arch/sparc64/sparc64/pmap.c
--- a/sys/arch/sparc64/sparc64/pmap.c Fri Nov 27 13:45:17 2015 +0000
+++ b/sys/arch/sparc64/sparc64/pmap.c Fri Nov 27 13:51:24 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.299 2015/09/08 13:18:06 nakayama Exp $ */
+/* $NetBSD: pmap.c,v 1.300 2015/11/27 13:51:24 joerg Exp $ */
/*
*
* Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.299 2015/09/08 13:18:06 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.300 2015/11/27 13:51:24 joerg Exp $");
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
@@ -1418,7 +1418,7 @@
}
DPRINTF(PDB_GROW, ("pmap_growkernel(%lx...%lx)\n", kbreak, maxkvaddr));
/* Align with the start of a page table */
- for (kbreak &= (-1 << PDSHIFT); kbreak < maxkvaddr;
+ for (kbreak &= ((~0ULL) << PDSHIFT); kbreak < maxkvaddr;
kbreak += (1 << PDSHIFT)) {
if (pseg_get(pm, kbreak) & TLB_V)
continue;
Home |
Main Index |
Thread Index |
Old Index