aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-dis.c
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r--opcodes/i386-dis.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 526627a..29db63d 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -34,17 +34,10 @@
#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 } },