From bc8457b00c81ef45d7db23b85a0fc54c91f16ae0 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 18 Jul 2008 21:19:11 +0000 Subject: 2008-07-18 Andrei Barbu * i386/i386/db_disasm.c (Iba): New macro. (db_inst_table): Use Iba for aam and aad instructions. (db_disasm): Decode operands for Iba case. --- ChangeLog | 6 ++++++ i386/i386/db_disasm.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9af559d..f17165f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-07-18 Andrei Barbu + + * i386/i386/db_disasm.c (Iba): New macro. + (db_inst_table): Use Iba for aam and aad instructions. + (db_disasm): Decode operands for Iba case. + 2008-07-15 Barry deFreese * device/cons.c (cnputc): Turn parameter `c' into a char. diff --git a/i386/i386/db_disasm.c b/i386/i386/db_disasm.c index 0032721..e15293b 100644 --- a/i386/i386/db_disasm.c +++ b/i386/i386/db_disasm.c @@ -94,6 +94,7 @@ boolean_t db_disasm_16 = FALSE; #define STI 33 /* FP stack */ #define X 34 /* extended FP op */ #define XA 35 /* for 'fstcw %ax' */ +#define Iba 36 /* byte immediate, don't print if 0xa */ struct inst { char * i_name; /* name */ @@ -749,8 +750,8 @@ struct inst db_inst_table[256] = { /*d1*/ { "", TRUE, LONG, op2(o1, E), (char *)db_Grp2 }, /*d2*/ { "", TRUE, BYTE, op2(CL, E), (char *)db_Grp2 }, /*d3*/ { "", TRUE, LONG, op2(CL, E), (char *)db_Grp2 }, -/*d4*/ { "aam", TRUE, NONE, 0, 0 }, -/*d5*/ { "aad", TRUE, NONE, 0, 0 }, +/*d4*/ { "aam", FALSE, NONE, op1(Iba), 0 }, +/*d5*/ { "aad", FALSE, NONE, op1(Iba), 0 }, /*d6*/ { "", FALSE, NONE, 0, 0 }, /*d7*/ { "xlat", FALSE, BYTE, op1(BX), 0 }, @@ -1333,6 +1334,12 @@ db_disasm( db_printf("$%#n", imm); break; + case Iba: + get_value_inc(imm, loc, 1, FALSE, task); + if (imm != 0x0a) + db_printf("$%#r", imm); + break; + case Ibs: get_value_inc(imm, loc, 1, TRUE, task); /* signed */ db_printf("$%#r", imm); -- cgit v1.2.3