NetBSD Problem Report #3567

Received: (qmail 22385 invoked from network); 2 May 1997 03:53:07 -0000
Message-Id: <199705020351.UAA07645@nooksack.ldc.cs.wwu.edu>
Date: Thu, 1 May 1997 20:51:27 -0700 (PDT)
From: denny1@home.com
To: gnats-bugs@gnats.netbsd.org
Subject: m68k ddb does not disassemble move16
X-Send-Pr-Version: www-1.0

>Number:         3567
>Category:       port-m68k
>Synopsis:       m68k ddb does not disassemble move16
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu May 01 21:05:00 +0000 1997
>Closed-Date:    Thu Jun 19 17:35:55 +0000 1997
>Last-Modified:  Thu Jun 19 17:40:10 +0000 1997
>Originator:     Denny Gentry
>Release:        netbsd-current (post 1.2)
>Organization:
personal
>Environment:
Irrelevant in this case. It happens to be a mac68k machine.
>Description:
  m68k's db_disasm.c does not disassemble the 68040 move16 instruction,
instead it prints UKNOWN COPROC OPCODE. move16 is used in copypage040,
and will be used in a bcopy implementation I am working on.
>How-To-Repeat:

>Fix:
  The following diffs add move16 disassembly. While you're in
there you might also correct the spelling of "UNKNOWN".

113a114
> void opcode_move16 __P((dis_buffer_t *, u_short));
1330a1332,1334
>       case 3:
>               opcode_move16(dbuf, opc);
>               return;
2278a2283,2325
> void
> opcode_move16(dbuf, opc)
>       dis_buffer_t *dbuf;
>       u_short opc;
> {
>       u_short ext;
> 
>       addstr(dbuf, "move16\t");
> 
>       if (ISBITSET(opc, 5)) {
>               PRINT_AREG(dbuf, BITFIELD(opc,2,0));
>               addstr(dbuf, "@+,");
>               ext = *(dbuf->val + 1);
>               PRINT_AREG(dbuf, BITFIELD(ext,14,12));
>               addstr(dbuf, "@+");
>               dbuf->used++;
>       } else {
>               switch (BITFIELD(opc,4,3)) {
>               case 0:
>                       PRINT_AREG(dbuf, BITFIELD(opc,2,0));
>                       addstr(dbuf, "@+,");
>                       get_immed(dbuf, SIZE_LONG);
>                       break;
>               case 1:
>                       get_immed(dbuf, SIZE_LONG);
>                       addchar(',');
>                       PRINT_AREG(dbuf, BITFIELD(opc,2,0));
>                       addstr(dbuf, "@+");
>                       break;
>               case 2:
>                       PRINT_AREG(dbuf, BITFIELD(opc,2,0));
>                       addstr(dbuf, "@,");
>                       get_immed(dbuf, SIZE_LONG);
>                       break;
>               case 3:
>                       get_immed(dbuf, SIZE_LONG);
>                       addchar(',');
>                       PRINT_AREG(dbuf, BITFIELD(opc,2,0));
>                       addchar('@');
>                       break;
>               }
>       }
> }
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: scottr 
State-Changed-When: Thu Jun 19 10:35:55 PDT 1997 
State-Changed-Why:  
Added suggested code, and fixed spelling of `unknown' while here. :-) 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.