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 Fix spr and tbr register number ext...
details: https://anonhg.NetBSD.org/src/rev/30337ad6c874
branches: trunk
changeset: 509520:30337ad6c874
user: simonb <simonb%NetBSD.org@localhost>
date: Sun May 06 16:40:22 2001 +0000
description:
Fix spr and tbr register number extraction. tbr is untested, but is the
same format as spr and had the same mistake.
diffstat:
sys/arch/powerpc/powerpc/db_disasm.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (33 lines):
diff -r 094c7c773450 -r 30337ad6c874 sys/arch/powerpc/powerpc/db_disasm.c
--- a/sys/arch/powerpc/powerpc/db_disasm.c Sun May 06 16:11:17 2001 +0000
+++ b/sys/arch/powerpc/powerpc/db_disasm.c Sun May 06 16:40:22 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.6 2001/05/06 16:11:17 simonb Exp $ */
+/* $NetBSD: db_disasm.c,v 1.7 2001/05/06 16:40:22 simonb Exp $ */
/* $OpenBSD: db_disasm.c,v 1.2 1996/12/28 06:21:48 rahnds Exp $ */
#include <sys/param.h>
@@ -572,8 +572,8 @@
u_int sprl;
u_int sprh;
char *reg;
- sprh = extract_field(instr, 31 - 15, 5);
- sprl = extract_field(instr, 31 - 20, 5);
+ sprl = extract_field(instr, 31 - 15, 5);
+ sprh = extract_field(instr, 31 - 20, 5);
spr = sprh << 5 | sprl;
/* this table could be written better */
@@ -735,9 +735,10 @@
u_int tbrl;
u_int tbrh;
char *reg;
- tbrh = extract_field(instr, 31 - 15, 5);
- tbrl = extract_field(instr, 31 - 20, 5);
+ tbrl = extract_field(instr, 31 - 15, 5);
+ tbrh = extract_field(instr, 31 - 20, 5);
tbr = tbrh << 5 | tbrl;
+
switch (tbr) {
case 268:
reg = "tbl";
Home |
Main Index |
Thread Index |
Old Index