This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA]: opcodes / i386 disassembler
- To: binutils at sourceware dot cygnus dot com, gdb-patches at sourceware dot cygnus dot com
- Subject: [RFA]: opcodes / i386 disassembler
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Thu, 20 Jul 2000 18:41:43 -0700 (PDT)
Would the following be acceptable? Assuming I provided an
suitable ChangeLog entry?
Index: i386-dis.c
===================================================================
RCS file: /cvs/cvsfiles/devo/opcodes/i386-dis.c,v
retrieving revision 1.51
diff -p -r1.51 i386-dis.c
*** i386-dis.c 2000/04/05 20:16:40 1.51
--- i386-dis.c 2000/07/21 01:40:08
*************** You should have received a copy of the G
*** 18,38 ****
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
! /*
! * 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
! * July 1988
! * modified by John Hassey (hassey@dg-rtp.dg.com)
! */
!
! /*
! * The main tables describing the instructions is essentially a copy
! * of the "Opcode Map" chapter (Appendix A) of the Intel 80386
! * Programmers Manual. Usually, there is a capital letter, followed
! * by a small letter. The capital letter tell the addressing mode,
! * and the small letter tells about the operand size. Refer to
! * the Intel manual for details.
! */
#include "dis-asm.h"
#include "sysdep.h"
#include "opintl.h"
--- 18,34 ----
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
! /* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
! July 1988, modified by John Hassey (hassey@dg-rtp.dg.com). */
+ /* The main tables describing the instructions is essentially a copy
+ of the "Opcode Map" chapter (Appendix A) of the Intel 80386
+ Programmers Manual and the Pentium(TM) Family User's Manual.
+ Usually, there is a capital letter, followed by a small letter.
+ The capital letter tell the addressing mode, and the small letter
+ tells about the operand size. Refer to the Intel manual for
+ details. */
+
#include "dis-asm.h"
#include "sysdep.h"
#include "opintl.h"
*************** static const struct dis386 dis386_att[]
*** 496,502 ****
/* 80 */
{ GRP1b },
{ GRP1S },
! { "(bad)", XX, XX, XX },
{ GRP1Ss },
{ "testB", Eb, Gb, XX },
{ "testS", Ev, Gv, XX },
--- 492,509 ----
/* 80 */
{ GRP1b },
{ GRP1S },
! /* this one is blank in appendix A of the 386 book, and given as
! "MOVB AL, imm8 in appendix A of the Pentium book with a footnote
! saying "Reserved"; it *should* be "Immediate Grp1, Ev, Ib"
! according to an Intel person who says it'll be fixed in the -004
! version of the Pentium book.
!
! The trick here is that 0x80 sets neither the "s" nor the "w" bit,
! while 0x82 sets the "s" bit but not the "w" bit. However, if the
! "w" bit isn't set, the setting of the "s" bit is irrelevant, as
! the operands are one byte long, so there's no sign-extension to be
! done. */
! { GRP1b },
{ GRP1Ss },
{ "testB", Eb, Gb, XX },
{ "testS", Ev, Gv, XX },
*************** static const struct dis386 dis386_twobyt
*** 968,974 ****
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
/* 20 */
! /* these are all backward in appendix A of the intel book */
{ "movL", Rd, Cd, XX },
{ "movL", Rd, Dd, XX },
{ "movL", Cd, Rd, XX },
--- 975,982 ----
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
/* 20 */
! /* these are all backward in appendix A of the intel book,
! but correct in appendix A of the Pentium book. */
{ "movL", Rd, Cd, XX },
{ "movL", Rd, Dd, XX },
{ "movL", Cd, Rd, XX },