This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Replace 0x60, 0x61 and 0x62 entries with x86-64 tables
- From: "Jan Beulich" <jbeulich at novell dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: <binutils at sourceware dot org>
- Date: Mon, 11 Dec 2006 08:30:28 +0000
- Subject: Re: PATCH: Replace 0x60, 0x61 and 0x62 entries with x86-64 tables
- References: <20061210024843.GA10913@lucon.org>
What do you achieve by doing this? Jan
>>> "H. J. Lu" <hjl@lucon.org> 10.12.06 03:48 >>>
Some opcodes mean different things under 32bit and 64bit. x86_64_table
is used for that. This patch replaces 0x60, 0x61 and 0x62 entries with
x86-64 tables.
H.J.
---
2006-12-09 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (X86_64_1): New.
(X86_64_2): Likewise.
(X86_64_3): Likewise.
(dis386): Replace 0x60, 0x61 and 0x62 entries with x86-64
tables.
(x86_64_table): Add entries for 0x60, 0x61 and 0x62.
--- opcodes/i386-dis.c.64 2006-12-09 18:27:45.000000000 -0800
+++ opcodes/i386-dis.c 2006-12-09 18:39:23.000000000 -0800
@@ -479,6 +479,9 @@ fetch_data (struct disassemble_info *inf
#define X86_64_0 NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0, NULL, 0
+#define X86_64_1 NULL, NULL, X86_64_SPECIAL, NULL, 1, NULL, 0, NULL, 0
+#define X86_64_2 NULL, NULL, X86_64_SPECIAL, NULL, 2, NULL, 0, NULL, 0
+#define X86_64_3 NULL, NULL, X86_64_SPECIAL, NULL, 3, NULL, 0, NULL, 0
#define THREE_BYTE_0 NULL, NULL, IS_3BYTE_OPCODE, NULL, 0, NULL, 0, NULL, 0
#define THREE_BYTE_1 NULL, NULL, IS_3BYTE_OPCODE, NULL, 1, NULL, 0, NULL, 0
@@ -647,10 +650,10 @@ static const struct dis386 dis386[] = {
{ "popV", RMrSI, XX, XX, XX },
{ "popV", RMrDI, XX, XX, XX },
/* 60 */
- { "pusha{P|}", XX, XX, XX, XX },
- { "popa{P|}", XX, XX, XX, XX },
- { "bound{S|}", Gv, Ma, XX, XX },
{ X86_64_0 },
+ { X86_64_1 },
+ { X86_64_2 },
+ { X86_64_3 },
{ "(bad)", XX, XX, XX, XX }, /* seg fs */
{ "(bad)", XX, XX, XX, XX }, /* seg gs */
{ "(bad)", XX, XX, XX, XX }, /* op size prefix */
@@ -2030,8 +2033,20 @@ static const struct dis386 prefix_user_t
static const struct dis386 x86_64_table[][2] = {
{
- { "arpl", Ew, Gw, XX, XX },
- { "movs{||lq|xd}", Gv, Ed, XX, XX },
+ { "pusha{P|}", XX, XX, XX, XX },
+ { "(bad)", XX, XX, XX, XX },
+ },
+ {
+ { "popa{P|}", XX, XX, XX, XX },
+ { "(bad)", XX, XX, XX, XX },
+ },
+ {
+ { "bound{S|}", Gv, Ma, XX, XX },
+ { "(bad)", XX, XX, XX, XX },
+ },
+ {
+ { "arpl", Ew, Gw, XX, XX },
+ { "movs{||lq|xd}", Gv, Ed, XX, XX },
},
};