Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Avoid left-shifting negative values.



details:   https://anonhg.NetBSD.org/src/rev/7a57e01ae5ad
branches:  trunk
changeset: 340826:7a57e01ae5ad
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Oct 04 08:16:13 2015 +0000

description:
Avoid left-shifting negative values.

diffstat:

 sys/arch/sparc/sparc/db_disasm.c     |  6 +++---
 sys/arch/sparc64/sparc64/db_disasm.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r c2389d8c284e -r 7a57e01ae5ad sys/arch/sparc/sparc/db_disasm.c
--- a/sys/arch/sparc/sparc/db_disasm.c  Sun Oct 04 08:15:46 2015 +0000
+++ b/sys/arch/sparc/sparc/db_disasm.c  Sun Oct 04 08:16:13 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_disasm.c,v 1.20 2011/04/14 08:59:09 mrg Exp $ */
+/*     $NetBSD: db_disasm.c,v 1.21 2015/10/04 08:16:13 joerg Exp $ */
 
 /*
  * Copyright (c) 1994 David S. Miller, davem%nadzieja.rutgers.edu@localhost
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.20 2011/04/14 08:59:09 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.21 2015/10/04 08:16:13 joerg Exp $");
 
 #include <sys/param.h>
 #include <machine/db_machdep.h>
@@ -900,7 +900,7 @@
 
                if (((bitmask>>30) & 0x3) == 0x1) {
                        /* Call */
-                       you_lose = ((~0x1)<<30);
+                       you_lose = ((~0x1U)<<30);
                } else if (((bitmask>>30) & 0x3) == 0x0) {
                        if (((bitmask>>22) & 0x7) == 0x4) {
                                /* Sethi */
diff -r c2389d8c284e -r 7a57e01ae5ad sys/arch/sparc64/sparc64/db_disasm.c
--- a/sys/arch/sparc64/sparc64/db_disasm.c      Sun Oct 04 08:15:46 2015 +0000
+++ b/sys/arch/sparc64/sparc64/db_disasm.c      Sun Oct 04 08:16:13 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_disasm.c,v 1.17 2014/02/27 18:14:52 joerg Exp $ */
+/*     $NetBSD: db_disasm.c,v 1.18 2015/10/04 08:16:14 joerg Exp $ */
 
 /*
  * Copyright (c) 1994 David S. Miller, davem%nadzieja.rutgers.edu@localhost
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.17 2014/02/27 18:14:52 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.18 2015/10/04 08:16:14 joerg Exp $");
 
 #include <sys/param.h>
 #include <machine/db_machdep.h>
@@ -905,7 +905,7 @@
 
                if (((bitmask>>30) & 0x3) == 0x1) {
                        /* Call */
-                       you_lose = ((~0x1)<<30);
+                       you_lose = ((~0x1U)<<30);
                } else if (((bitmask>>30) & 0x3) == 0x0) {
                        if (((bitmask>>22) & 0x7) == 0x4) {
                                /* Sethi */



Home | Main Index | Thread Index | Old Index