aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1996-07-16 00:01:50 +0000
committerStu Grossman <grossman@cygnus>1996-07-16 00:01:50 +0000
commitd9ad578c497910264ca8fdf78aa2ded8c55a787c (patch)
treed1bf0144d9655670f6c9bd368e7b2a0952d20dc2 /opcodes
parenta29322f78525c50e19a0111eb1173eb942bc2a2e (diff)
downloadgdb-d9ad578c497910264ca8fdf78aa2ded8c55a787c.zip
gdb-d9ad578c497910264ca8fdf78aa2ded8c55a787c.tar.gz
gdb-d9ad578c497910264ca8fdf78aa2ded8c55a787c.tar.bz2
* i386-dis.c (print_insn_i8086): New routine to disassemble using
the 8086 instruction set. * i386-dis.c: General cleanups. Make most things static. Add prototypes. Get rid of static variables aflags and dflags. Pass them as args (to almost everything).
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/i386-dis.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 6fcc724..f5c3aaa 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -1034,15 +1034,12 @@ print_insn_i386 (pc, info)
bfd_vma pc;
disassemble_info *info;
{
- print_insn_x86 (pc, info, 1, 1);
-}
-
-int
-print_insn_i8086 (pc, info)
- bfd_vma pc;
- disassemble_info *info;
-{
- print_insn_x86 (pc, info, 0, 0);
+ if (info->mach == bfd_mach_i386_i386)
+ print_insn_x86 (pc, info, 1, 1);
+ else if (info->mach == bfd_mach_i386_i8086)
+ print_insn_x86 (pc, info, 0, 0);
+ else
+ abort ();
}
int