gas/
[deliverable/binutils-gdb.git] / opcodes / i386-dis.c
index 526627afc9f8c5fb3ac0b89afec5c6330a978ee5..29db63d277a9d378c8a3851cd15a7e95b04c529f 100644 (file)
 #include "dis-asm.h"
 #include "sysdep.h"
 #include "opintl.h"
-
-#define MAXLEN 15
+#include "opcode/i386.h"
 
 #include <setjmp.h>
 
-#ifndef UNIXWARE_COMPAT
-/* Set non-zero for broken, compatible instructions.  Set to zero for
-   non-broken opcodes.  */
-#define UNIXWARE_COMPAT 1
-#endif
-
 static int fetch_data (struct disassemble_info *, bfd_byte *);
 static void ckprefix (void);
 static const char *prefix_name (int, int);
@@ -109,16 +102,12 @@ static void CMPXCHG8B_Fixup (int, int);
 struct dis_private {
   /* Points to first byte not fetched.  */
   bfd_byte *max_fetched;
-  bfd_byte the_buffer[MAXLEN];
+  bfd_byte the_buffer[MAX_MNEM_SIZE];
   bfd_vma insn_start;
   int orig_sizeflag;
   jmp_buf bailout;
 };
 
-/* The opcode for the fwait instruction, which we treat as a prefix
-   when we can.  */
-#define FWAIT_OPCODE (0x9b)
-
 enum address_mode
 {
   mode_16bit,
@@ -183,7 +172,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
   struct dis_private *priv = (struct dis_private *) info->private_data;
   bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
 
-  if (addr <= priv->the_buffer + MAXLEN)
+  if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
     status = (*info->read_memory_func) (start,
                                        priv->max_fetched,
                                        addr - priv->max_fetched,
@@ -490,8 +479,6 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
 
 typedef void (*op_rtn) (int bytemode, int sizeflag);
 
-#define MAX_OPERANDS 4
-
 struct dis386 {
   const char *name;
   struct
@@ -3515,7 +3502,7 @@ static const struct dis386 float_reg[][8] = {
     { "fmul",  { STi, ST } },
     { "(bad)", { XX } },
     { "(bad)", { XX } },
-#if UNIXWARE_COMPAT
+#if SYSV386_COMPAT
     { "fsub",  { STi, ST } },
     { "fsubr", { STi, ST } },
     { "fdiv",  { STi, ST } },
@@ -3544,7 +3531,7 @@ static const struct dis386 float_reg[][8] = {
     { "fmulp", { STi, ST } },
     { "(bad)", { XX } },
     { FGRPde_3 },
-#if UNIXWARE_COMPAT
+#if SYSV386_COMPAT
     { "fsubp", { STi, ST } },
     { "fsubrp",        { STi, ST } },
     { "fdivp", { STi, ST } },
This page took 0.031691 seconds and 4 git commands to generate.