From: John Gilmore Date: Fri, 13 Sep 1991 00:29:14 +0000 (+0000) Subject: * am29k-pinsn.c (print_insn): Handle NOP specially. Avoid %#x X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8d8f91d85a4aed92c92820b23a62686ec0af2680;p=binutils-gdb.git * am29k-pinsn.c (print_insn): Handle NOP specially. Avoid %#x format string; use 0x%x instead. --- diff --git a/gdb/am29k-pinsn.c b/gdb/am29k-pinsn.c index 1e09a14ade0..47913485391 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; }