aboutsummaryrefslogtreecommitdiff
path: root/gdb/am29k-pinsn.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-09-13 00:29:14 +0000
committerJohn Gilmore <gnu@cygnus>1991-09-13 00:29:14 +0000
commit8d8f91d85a4aed92c92820b23a62686ec0af2680 (patch)
tree544c26d477b59477afd516a5dae26ba1eda31568 /gdb/am29k-pinsn.c
parentcdfb33730947cb50c60b312d9a723a8de38abd82 (diff)
downloadgdb-8d8f91d85a4aed92c92820b23a62686ec0af2680.zip
gdb-8d8f91d85a4aed92c92820b23a62686ec0af2680.tar.gz
gdb-8d8f91d85a4aed92c92820b23a62686ec0af2680.tar.bz2
* am29k-pinsn.c (print_insn): Handle NOP specially. Avoid %#x
format string; use 0x%x instead.
Diffstat (limited to 'gdb/am29k-pinsn.c')
-rw-r--r--gdb/am29k-pinsn.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/am29k-pinsn.c b/gdb/am29k-pinsn.c
index 1e09a14..4791348 100644
--- a/gdb/am29k-pinsn.c
+++ b/gdb/am29k-pinsn.c
@@ -135,6 +135,12 @@ print_insn (memaddr, stream)
find_bytes (insn, &insn0, &insn8, &insn16, &insn24);
+ /* Handle the nop (aseq 0x40,gr1,gr1) specially */
+ if ((insn24==0x70) && (insn16==0x40) && (insn8==0x01) && (insn0==0x01)) {
+ fprintf_filtered (stream,"nop");
+ return 4;
+ }
+
/* The opcode is always in insn24. */
for (opcode = &am29k_opcodes[0];
opcode < &am29k_opcodes[NUM_OPCODES];
@@ -203,7 +209,7 @@ print_insn (memaddr, stream)
break;
case 'v':
- fprintf_filtered (stream, "%#x", insn16);
+ fprintf_filtered (stream, "0x%x", insn16);
break;
case 's':
@@ -290,7 +296,7 @@ print_insn (memaddr, stream)
return 4;
}
}
- fprintf_filtered (stream, ".word %#8x",
+ fprintf_filtered (stream, ".word 0x%8x",
(insn24 << 24) + (insn16 << 16) + (insn8 << 8) + insn0);
return 4;
}