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 Print negative SIMM operands correc...
details: https://anonhg.NetBSD.org/src/rev/8a751dfae063
branches: trunk
changeset: 520248:8a751dfae063
user: jhawk <jhawk%NetBSD.org@localhost>
date: Sat Jan 05 22:07:26 2002 +0000
description:
Print negative SIMM operands correctly; previously, negative numbers
were bogus.
diffstat:
sys/arch/powerpc/powerpc/db_disasm.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 479c2e6be4e0 -r 8a751dfae063 sys/arch/powerpc/powerpc/db_disasm.c
--- a/sys/arch/powerpc/powerpc/db_disasm.c Sat Jan 05 20:55:16 2002 +0000
+++ b/sys/arch/powerpc/powerpc/db_disasm.c Sat Jan 05 22:07:26 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.11 2002/01/05 20:22:52 jhawk Exp $ */
+/* $NetBSD: db_disasm.c,v 1.12 2002/01/05 22:07:26 jhawk Exp $ */
/* $OpenBSD: db_disasm.c,v 1.2 1996/12/28 06:21:48 rahnds Exp $ */
#include <sys/param.h>
@@ -725,13 +725,16 @@
IMM = extract_field(instr, 31 - 31, 16);
if (IMM & 0x8000) {
pstr += sprintf(pstr, "-");
+ IMM = 0x10000-IMM;
}
- /* no break */
func &= ~Op_SIMM;
+ goto common;
case Op_UIMM:
IMM = extract_field(instr, 31 - 31, 16);
+ func &= ~Op_UIMM;
+ goto common;
+ common:
pstr += sprintf(pstr, "0x%x", IMM);
- func &= ~Op_UIMM;
break;
default:
}
Home |
Main Index |
Thread Index |
Old Index