Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc Fix SIGNEX macro: sizeof is in bytes, n...



details:   https://anonhg.NetBSD.org/src/rev/62f9e5556525
branches:  trunk
changeset: 515990:62f9e5556525
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sat Oct 13 00:41:49 2001 +0000

description:
Fix SIGNEX macro: sizeof is in bytes, not bits.

diffstat:

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

diffs (18 lines):

diff -r d4a2eb06928f -r 62f9e5556525 sys/arch/sparc/sparc/db_disasm.c
--- a/sys/arch/sparc/sparc/db_disasm.c  Sat Oct 13 00:15:53 2001 +0000
+++ b/sys/arch/sparc/sparc/db_disasm.c  Sat Oct 13 00:41:49 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_disasm.c,v 1.13 2000/08/16 11:30:38 pk Exp $ */
+/*     $NetBSD: db_disasm.c,v 1.14 2001/10/13 00:41:49 uwe Exp $ */
 
 /*
  * Copyright (c) 1994 David S. Miller, davem%nadzieja.rutgers.edu@localhost
@@ -42,7 +42,7 @@
 
 /* Sign extend values */
 #define        SIGNEX(v,width)         ({                                      \
-       unsigned s = sizeof(long)-(width);                              \
+       unsigned s = sizeof(long)*8-(width);                            \
        (((long)(v) << s) >> s);                                        \
 })
 #define SIGN(v)                        (((v)<0)?"-":"")



Home | Main Index | Thread Index | Old Index