/* Print i386 instructions for GDB, the GNU debugger.
- Copyright (C) 1988, 1989, 1991, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1989, 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
*/
#include "dis-asm.h"
-#include <string.h>
+#include "sysdep.h"
#define MAXLEN 20
#include <setjmp.h>
-struct private
+struct dis_private
{
/* Points to first byte not fetched. */
bfd_byte *max_fetched;
to ADDR (exclusive) are valid. Returns 1 for success, longjmps
on error. */
#define FETCH_DATA(info, addr) \
- ((addr) <= ((struct private *)(info->private_data))->max_fetched \
+ ((addr) <= ((struct dis_private *)(info->private_data))->max_fetched \
? 1 : fetch_data ((info), (addr)))
static int
bfd_byte *addr;
{
int status;
- struct private *priv = (struct private *)info->private_data;
+ struct dis_private *priv = (struct dis_private *)info->private_data;
bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
status = (*info->read_memory_func) (start,
#define GRP6 NULL, NULL, 13
#define GRP7 NULL, NULL, 14
#define GRP8 NULL, NULL, 15
+#define GRP9 NULL, NULL, 16
#define FLOATCODE 50
#define FLOAT NULL, NULL, FLOATCODE
{ "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
{ "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
/* 30 */
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { "wrmsr" }, { "rdtsc" }, { "rdmsr" }, { "(bad)" },
{ "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
/* 38 */
{ "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
/* a0 */
{ "pushl", fs },
{ "popl", fs },
- { "(bad)" },
+ { "cpuid" },
{ "btS", Ev, Gv },
{ "shldS", Ev, Gv, Ib },
{ "shldS", Ev, Gv, CL },
/* a8 */
{ "pushl", gs },
{ "popl", gs },
- { "(bad)" },
+ { "rsm" },
{ "btsS", Ev, Gv },
{ "shrdS", Ev, Gv, Ib },
{ "shrdS", Ev, Gv, CL },
/* c0 */
{ "xaddb", Eb, Gb },
{ "xaddS", Ev, Gv },
- { "(bad)" }, { "(bad)" },
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { "(bad)" },
+ { "(bad)" },
+ { "(bad)" },
+ { "(bad)" },
+ { "(bad)" },
+ { GRP9 },
/* c8 */
{ "bswap", eAX },
{ "bswap", eCX },
{ "btsS", Ev, Ib },
{ "btrS", Ev, Ib },
{ "btcS", Ev, Ib },
+ },
+ /* GRP9 */
+ {
+ { "(bad)" },
+ { "cmpxch8b", Ev },
+ { "(bad)" },
+ { "(bad)" },
+ { "(bad)" },
+ { "(bad)" },
+ { "(bad)" },
+ { "(bad)" },
}
};
char *first, *second, *third;
int needcomma;
- struct private priv;
+ struct dis_private priv;
bfd_byte *inbuf = priv.the_buffer;
info->private_data = (PTR) &priv;