X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fam29k-pinsn.c;h=337bf90c34bcc630e1fadc5006b94ea9045b7d31;hb=51b80b0072e928c9163087e1fcbc71e52301f524;hp=4791348539192c8b4ae3d05c1baaa8d085ad31d7;hpb=8d8f91d85a4aed92c92820b23a62686ec0af2680;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/am29k-pinsn.c b/gdb/am29k-pinsn.c index 4791348539..337bf90c34 100644 --- a/gdb/am29k-pinsn.c +++ b/gdb/am29k-pinsn.c @@ -18,11 +18,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include - #include "defs.h" #include "target.h" -#include "am29k-opcode.h" +#include "opcode/a29k.h" /* Print a symbolic representation of a general-purpose register number NUM on STREAM. @@ -129,7 +127,7 @@ print_insn (memaddr, stream) /* The four bytes of the instruction. */ unsigned char insn24, insn16, insn8, insn0; - struct am29k_opcode *opcode; + struct a29k_opcode *opcode; read_memory (memaddr, &insn[0], 4); @@ -142,11 +140,11 @@ print_insn (memaddr, stream) } /* The opcode is always in insn24. */ - for (opcode = &am29k_opcodes[0]; - opcode < &am29k_opcodes[NUM_OPCODES]; + for (opcode = &a29k_opcodes[0]; + opcode < &a29k_opcodes[num_opcodes]; ++opcode) { - if (insn24 == opcode->opcode) + if ((insn24<<24) == opcode->opcode) { char *s; @@ -233,11 +231,11 @@ print_insn (memaddr, stream) break; case 'F': - fprintf_filtered (stream, "%d", (insn0 >> 18) & 15); + fprintf_filtered (stream, "%d", (insn16 >> 2) & 15); break; case 'C': - fprintf_filtered (stream, "%d", (insn0 >> 16) & 3); + fprintf_filtered (stream, "%d", insn16 & 3); break; default: