summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2008-07-18 21:19:11 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:17 +0200
commitbc8457b00c81ef45d7db23b85a0fc54c91f16ae0 (patch)
treef06683bc96380267ccd869c927ddd7b24a07ba50
parent95a9250f3139d396a18692789836d0b9b092fd73 (diff)
2008-07-18 Andrei Barbu <andrei@0xab.com>
* 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.
-rw-r--r--ChangeLog6
-rw-r--r--i386/i386/db_disasm.c11
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 <andrei@0xab.com>
+
+ * 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 <bddebian@comcast.net>
* 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);