diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-05-05 18:30:06 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-05-05 18:30:06 +0000 |
commit | 41b96d55e8e973fc7eebc1d1b94b9e0f91213d7e (patch) | |
tree | da6a5b89d54635b6c197d07fbc681a4cc4c9e37e /opcodes | |
parent | d23af88239c61cea5114495e36dc8884d8b05117 (diff) | |
download | gdb-41b96d55e8e973fc7eebc1d1b94b9e0f91213d7e.zip gdb-41b96d55e8e973fc7eebc1d1b94b9e0f91213d7e.tar.gz gdb-41b96d55e8e973fc7eebc1d1b94b9e0f91213d7e.tar.bz2 |
* i386-dis.c: Revert patch of April 4. The output now matches
what gcc generates.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 5 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 54 |
2 files changed, 48 insertions, 11 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 3658d84..8a66920 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +Mon May 5 14:28:41 1997 Ian Lance Taylor <ian@cygnus.com> + + * i386-dis.c: Revert patch of April 4. The output now matches + what gcc generates. + Fri May 2 12:48:37 1997 Doug Evans <dje@canuck.cygnus.com> * m32r-opc.c (m32r_cgen_insn_table, cmpui): Use $uimm16 instead diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index f5c3aaa..fa45ead 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -1,5 +1,6 @@ /* Print i386 instructions for GDB, the GNU debugger. - Copyright (C) 1988, 89, 91, 93, 94, 95, 1996 Free Software Foundation, Inc. + Copyright (C) 1988, 89, 91, 93, 94, 95, 96, 1997 + Free Software Foundation, Inc. This file is part of GDB. @@ -39,6 +40,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <setjmp.h> +static int fetch_data PARAMS ((struct disassemble_info *, bfd_byte *)); + struct dis_private { /* Points to first byte not fetched. */ @@ -97,7 +100,9 @@ fetch_data (info, addr) #define Iw OP_I, w_mode #define Jb OP_J, b_mode #define Jv OP_J, v_mode +#if 0 #define ONE OP_ONE, 0 +#endif #define Cd OP_C, d_mode #define Dd OP_D, d_mode #define Td OP_T, d_mode @@ -139,11 +144,29 @@ fetch_data (info, addr) #define fs OP_REG, fs_reg #define gs OP_REG, gs_reg -typedef int op_rtn PARAMS ((int bytemode, int aflag, int dflag)); - -static op_rtn OP_E, OP_G, OP_I, OP_indirE, OP_sI, OP_REG, OP_J, OP_DIR, OP_OFF; -static op_rtn OP_ESDI, OP_DSSI, OP_SEG, OP_ONE, OP_C, OP_D, OP_T, OP_rm, OP_ST; -static op_rtn OP_STi; +typedef int (*op_rtn) PARAMS ((int bytemode, int aflag, int dflag)); + +static int OP_E PARAMS ((int, int, int)); +static int OP_G PARAMS ((int, int, int)); +static int OP_I PARAMS ((int, int, int)); +static int OP_indirE PARAMS ((int, int, int)); +static int OP_sI PARAMS ((int, int, int)); +static int OP_REG PARAMS ((int, int, int)); +static int OP_J PARAMS ((int, int, int)); +static int OP_DIR PARAMS ((int, int, int)); +static int OP_OFF PARAMS ((int, int, int)); +static int OP_ESDI PARAMS ((int, int, int)); +static int OP_DSSI PARAMS ((int, int, int)); +static int OP_SEG PARAMS ((int, int, int)); +static int OP_C PARAMS ((int, int, int)); +static int OP_D PARAMS ((int, int, int)); +static int OP_T PARAMS ((int, int, int)); +static int OP_rm PARAMS ((int, int, int)); +static int OP_ST PARAMS ((int, int, int)); +static int OP_STi PARAMS ((int, int, int)); +#if 0 +static int OP_ONE PARAMS ((int, int, int)); +#endif static void append_prefix PARAMS ((void)); static void set_op PARAMS ((int op)); @@ -218,11 +241,11 @@ static void ckprefix PARAMS ((void)); struct dis386 { char *name; - op_rtn *op1; + op_rtn op1; int bytemode1; - op_rtn *op2; + op_rtn op2; int bytemode2; - op_rtn *op3; + op_rtn op3; int bytemode3; }; @@ -1035,9 +1058,9 @@ print_insn_i386 (pc, info) disassemble_info *info; { if (info->mach == bfd_mach_i386_i386) - print_insn_x86 (pc, info, 1, 1); + return print_insn_x86 (pc, info, 1, 1); else if (info->mach == bfd_mach_i386_i8086) - print_insn_x86 (pc, info, 0, 0); + return print_insn_x86 (pc, info, 0, 0); else abort (); } @@ -1057,6 +1080,10 @@ print_insn_x86 (pc, info, aflag, dflag) struct dis_private priv; bfd_byte *inbuf = priv.the_buffer; + /* The output looks better if we put 5 bytes on a line, since that + puts long word instructions on a single line. */ + info->bytes_per_line = 5; + info->private_data = (PTR) &priv; priv.max_fetched = priv.the_buffer; priv.insn_start = pc; @@ -2019,6 +2046,9 @@ OP_DSSI (dummy, aflag, dflag) return (0); } +#if 0 +/* Not used. */ + /* ARGSUSED */ static int OP_ONE (dummy, aflag, dflag) @@ -2030,6 +2060,8 @@ OP_ONE (dummy, aflag, dflag) return (0); } +#endif + /* ARGSUSED */ static int OP_C (dummy, aflag, dflag) |