diff options
author | Michal Ludvig <mludvig@suse.cz> | 2004-03-12 10:14:29 +0000 |
---|---|---|
committer | Michal Ludvig <mludvig@suse.cz> | 2004-03-12 10:14:29 +0000 |
commit | 0f10071e3dbfb84b625c8609615bdd0d7b66ec3e (patch) | |
tree | 805d22cdc90a76c428a876dd8cf10b69631671d9 /opcodes | |
parent | c02908d2c016356ad1027f85b70643c7017dafd2 (diff) | |
download | gdb-0f10071e3dbfb84b625c8609615bdd0d7b66ec3e.zip gdb-0f10071e3dbfb84b625c8609615bdd0d7b66ec3e.tar.gz gdb-0f10071e3dbfb84b625c8609615bdd0d7b66ec3e.tar.bz2 |
2004-03-12 Michal Ludvig <mludvig@suse.cz>
* gas/config/tc-i386.c (output_insn): Handle PadLock instructions.
* gas/config/tc-i386.h (CpuPadLock): New define.
(CpuUnknownFlags): Added CpuPadLock.
* include/opcode/i386.h (i386_optab): Added xstore/xcrypt insns.
* opcodes/i386-dis.c (PADLOCK_SPECIAL, PADLOCK_0): New defines.
(dis386_twobyte): Opcode 0xa7 is PADLOCK_0.
(padlock_table): New struct with PadLock instructions.
(print_insn): Handle PADLOCK_SPECIAL.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 7 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 39 |
2 files changed, 44 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 545c37b..f576724 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2004-03-12 Michal Ludvig <mludvig@suse.cz> + + * i386-dis.c (PADLOCK_SPECIAL, PADLOCK_0): New defines. + (dis386_twobyte): Opcode 0xa7 is PADLOCK_0. + (padlock_table): New struct with PadLock instructions. + (print_insn): Handle PADLOCK_SPECIAL. + 2004-03-12 Alan Modra <amodra@bigpond.net.au> * i386-dis.c (grps): Use clflush by default for 0x0fae/7. diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 067c750..ea41d2f 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -1,6 +1,6 @@ /* Print i386 instructions for GDB, the GNU debugger. Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2001, 2002, 2003 Free Software Foundation, Inc. + 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ * July 1988 * modified by John Hassey (hassey@dg-rtp.dg.com) * x86-64 support added by Jan Hubicka (jh@suse.cz) + * VIA PadLock support by Michal Ludvig (mludvig@suse.cz) */ /* @@ -362,6 +363,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define USE_GROUPS 2 #define USE_PREFIX_USER_TABLE 3 #define X86_64_SPECIAL 4 +#define PADLOCK_SPECIAL 5 #define FLOAT NULL, NULL, FLOATCODE, NULL, 0, NULL, 0 @@ -388,6 +390,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define GRP13 NULL, NULL, USE_GROUPS, NULL, 20, NULL, 0 #define GRP14 NULL, NULL, USE_GROUPS, NULL, 21, NULL, 0 #define GRPAMD NULL, NULL, USE_GROUPS, NULL, 22, NULL, 0 +#define GRPPLOCK NULL, NULL, USE_GROUPS, NULL, 23, NULL, 0 #define PREGRP0 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 0, NULL, 0 #define PREGRP1 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 1, NULL, 0 @@ -425,6 +428,8 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define X86_64_0 NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0 +#define PADLOCK_0 NULL, NULL, PADLOCK_SPECIAL, NULL, 0, NULL, 0 + typedef void (*op_rtn) (int bytemode, int sizeflag); struct dis386 { @@ -948,7 +953,7 @@ static const struct dis386 dis386_twobyte[] = { { "shldS", Ev, Gv, Ib }, { "shldS", Ev, Gv, CL }, { "(bad)", XX, XX, XX }, - { "(bad)", XX, XX, XX }, + { PADLOCK_0 }, /* a8 */ { "pushT", gs, XX, XX }, { "popT", gs, XX, XX }, @@ -1449,6 +1454,17 @@ static const struct dis386 grps[][8] = { { "(bad)", XX, XX, XX }, { "(bad)", XX, XX, XX }, { "(bad)", XX, XX, XX }, + }, + /* GRPPLOCK */ + { + { "xstore", XX, XX, XX }, + { "xcryptecb", XX, XX, XX }, + { "xcryptcbc", XX, XX, XX }, + { "(bad)", XX, XX, XX }, + { "xcryptcfb", XX, XX, XX }, + { "xcryptofb", XX, XX, XX }, + { "(bad)", XX, XX, XX }, + { "(bad)", XX, XX, XX }, } }; @@ -1693,6 +1709,19 @@ static const struct dis386 x86_64_table[][2] = { }, }; +static const struct dis386 padlock_table[][8] = { + { + { "xstorerng", XX, XX, XX }, + { "xcryptecb", XX, XX, XX }, + { "xcryptcbc", XX, XX, XX }, + { "(bad)", XX, XX, XX }, + { "xcryptcfb", XX, XX, XX }, + { "xcryptofb", XX, XX, XX }, + { "(bad)", XX, XX, XX }, + { "(bad)", XX, XX, XX }, + }, +}; + #define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>") static void @@ -2191,6 +2220,12 @@ print_insn (bfd_vma pc, disassemble_info *info) dp = &x86_64_table[dp->bytemode2][mode_64bit]; break; + case PADLOCK_SPECIAL: + FETCH_DATA (info, codep + 1); + index = (*codep++ >> 3) & 0x07; + dp = &padlock_table[dp->bytemode2][index]; + break; + default: oappend (INTERNAL_DISASSEMBLER_ERROR); break; |