diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-12-04 07:51:41 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-12-04 07:51:41 +0000 |
commit | eacc9c891d71cfef7f5c1f152291daeab785b3d4 (patch) | |
tree | b2d8fb26798447501904e39f33f7ac9c0dd081e5 /opcodes/i386-dis.c | |
parent | 90f5d9d96125bc43fc8c332ed9450d9e8bf4f5b0 (diff) | |
download | binutils-gdb-eacc9c891d71cfef7f5c1f152291daeab785b3d4.tar.gz |
Support fxsave64 and fxrstor64.
gas/testsuite/
2009-12-03 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/i386.exp: Run x86-64-fxsave and x86-64-fxsave-intel.
* gas/i386/rex.d: Updated for fxsave64.
* gas/i386/x86-64-fxsave-intel.d: New.
* gas/i386/x86-64-fxsave.d: Likewise.
* gas/i386/x86-64-fxsave.s: Likewise.
opcodes/
2009-12-03 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (FXSAVE_Fixup): New.
(FXSAVE): Likewise.
(mod_table): Use FXSAVE on fxsave and fxrstor.
* i386-opc.tbl: Add fxsave64 and fxrstor64.
* i386-tbl.h: Regenerated.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r-- | opcodes/i386-dis.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index a9bb2b1a203..0e5b0ab01f4 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -110,6 +110,7 @@ static void REP_Fixup (int, int); static void CMPXCHG8B_Fixup (int, int); static void XMM_Fixup (int, int); static void CRC32_Fixup (int, int); +static void FXSAVE_Fixup (int, int); static void OP_LWPCB_E (int, int); static void OP_LWP_E (int, int); static void OP_LWP_I (int, int); @@ -358,6 +359,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define OPSUF { OP_3DNowSuffix, 0 } #define CMP { CMP_Fixup, 0 } #define XMM0 { XMM_Fixup, 0 } +#define FXSAVE { FXSAVE_Fixup, 0 } #define Vex_2src_1 { OP_Vex_2src_1, 0 } #define Vex_2src_2 { OP_Vex_2src_2, 0 } @@ -9541,12 +9543,12 @@ static const struct dis386 mod_table[][2] = { }, { /* MOD_0FAE_REG_0 */ - { "fxsave", { M } }, + { "fxsave", { FXSAVE } }, { "(bad)", { XX } }, }, { /* MOD_0FAE_REG_1 */ - { "fxrstor", { M } }, + { "fxrstor", { FXSAVE } }, { "(bad)", { XX } }, }, { @@ -13641,6 +13643,22 @@ skip: OP_E (bytemode, sizeflag); } +static void +FXSAVE_Fixup (int bytemode, int sizeflag) +{ + /* Add proper suffix to "fxsave" and "fxrstor". */ + USED_REX (REX_W); + if (rex & REX_W) + { + char *p = mnemonicendp; + *p++ = '6'; + *p++ = '4'; + *p = '\0'; + mnemonicendp = p; + } + OP_M (bytemode, sizeflag); +} + /* Display the destination register operand for instructions with VEX. */ |