Disassemble the MOVE16 instruction. Also, correct the spelling of
`unknown' while were here, as suggested. From Denny Gentry <denny1@home.com>, PR 3567.
This commit is contained in:
parent
c6bccee655
commit
ecc68fd60f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_disasm.c,v 1.19 1996/10/30 08:22:39 is Exp $ */
|
||||
/* $NetBSD: db_disasm.c,v 1.20 1997/06/19 17:39:38 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -110,6 +110,7 @@ void opcode_1110 __P((dis_buffer_t *, u_short));
|
||||
void opcode_fpu __P((dis_buffer_t *, u_short));
|
||||
void opcode_mmu __P((dis_buffer_t *, u_short));
|
||||
void opcode_mmu040 __P((dis_buffer_t *, u_short));
|
||||
void opcode_move16 __P((dis_buffer_t *, u_short));
|
||||
|
||||
/* subs of groups */
|
||||
void opcode_movec __P((dis_buffer_t *, u_short));
|
||||
@ -1327,6 +1328,9 @@ opcode_coproc(dbuf, opc)
|
||||
case 2:
|
||||
opcode_mmu040(dbuf, opc);
|
||||
return;
|
||||
case 3:
|
||||
opcode_move16(dbuf, opc);
|
||||
return;
|
||||
}
|
||||
switch (BITFIELD(opc,8,6)) {
|
||||
case 0:
|
||||
@ -1344,7 +1348,7 @@ opcode_coproc(dbuf, opc)
|
||||
case 5:
|
||||
default:
|
||||
}
|
||||
addstr(dbuf, "UKNOWN COPROC OPCODE");
|
||||
addstr(dbuf, "UNKNOWN COPROC OPCODE");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2275,6 +2279,52 @@ opcode_movec(dbuf, opc)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* disassemble move16 opcode.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* copy const string 's' into ``dbuf''->casm
|
||||
|
Loading…
Reference in New Issue
Block a user