Fix a few off-by-one errors in bitnumbers used by print_fcode.

ptestX fc,<ea>,M used to be printed with the wrong semantics of the fc
field, and could panic the kernel if fc was interpreted as a register number.
This commit is contained in:
is 1996-06-12 20:22:42 +00:00
parent 459cefbe67
commit 51e832dc49
1 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_disasm.c,v 1.14 1996/04/29 20:50:26 leo Exp $ */
/* $NetBSD: db_disasm.c,v 1.15 1996/06/12 20:22:42 is Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -1954,10 +1954,10 @@ print_fcode(dbuf, fc)
dis_buffer_t *dbuf;
u_short fc;
{
if (ISBITSET(fc, 5))
printu_bf(dbuf, fc, 4, 0);
else if (ISBITSET(fc, 4))
PRINT_DREG(dbuf, BITFIELD(fc, 3, 0));
if (ISBITSET(fc, 4))
printu_bf(dbuf, fc, 3, 0);
else if (ISBITSET(fc, 3))
PRINT_DREG(dbuf, BITFIELD(fc, 2, 0));
else if (fc == 1)
addstr(dbuf, "sfc");
else