aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1991-11-09 00:13:31 +0000
committerSteve Chamberlain <sac@cygnus>1991-11-09 00:13:31 +0000
commit66f3e59427aad237cabe45430cbd5886ba200c54 (patch)
tree5c17b6489f3090f2e65e38c01258824c0dfa7cea /binutils
parent203eea5d623c083f9eb0d66819ff45360a3d9001 (diff)
downloadfsf-binutils-gdb-66f3e59427aad237cabe45430cbd5886ba200c54.zip
fsf-binutils-gdb-66f3e59427aad237cabe45430cbd5886ba200c54.tar.gz
fsf-binutils-gdb-66f3e59427aad237cabe45430cbd5886ba200c54.tar.bz2
Fixed bug printing 29050 instructions.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/am29k-pinsn.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/binutils/am29k-pinsn.c b/binutils/am29k-pinsn.c
index a1ea0f6..431fe5e 100644
--- a/binutils/am29k-pinsn.c
+++ b/binutils/am29k-pinsn.c
@@ -146,7 +146,7 @@ print_insn_a29k (memaddr, buffer, stream)
/* The four bytes of the instruction. */
unsigned char insn24, insn16, insn8, insn0;
-
+ unsigned long value;
CONST struct am29k_opcode *opcode;
#ifdef GDB
@@ -160,6 +160,7 @@ print_insn_a29k (memaddr, buffer, stream)
find_bytes (insn, &insn0, &insn8, &insn16, &insn24);
+ value = (insn24 << 24) + (insn16 << 16) + (insn8 << 8) + insn0;
/* Handle the nop (aseq 0x40,gr1,gr1) specially */
if ((insn24==0x70) && (insn16==0x40) && (insn8==0x01) && (insn0==0x01)) {
fprintf_filtered (stream,"nop");
@@ -263,11 +264,11 @@ print_insn_a29k (memaddr, buffer, stream)
break;
case 'F':
- fprintf_filtered (stream, "%d", (insn0 >> 18) & 15);
+ fprintf_filtered (stream, "%d", (value >> 18) & 0xf);
break;
case 'C':
- fprintf_filtered (stream, "%d", (insn0 >> 16) & 3);
+ fprintf_filtered (stream, "%d", (value >> 16) & 3);
break;
default: