1
0
Fork 0
alistair23-linux/arch/powerpc/xmon
Michael Ellerman 941d810725 powerpc/xmon: Fix disassembly since printf changes
The recent change to add printf annotations to xmon inadvertently made
the disassembly output ugly, eg:

  c00000002001e058  7ee00026      mfcr    r23
  c00000002001e05c  fffffffffae101a0      std     r23,416(r1)
  c00000002001e060  fffffffff8230000      std     r1,0(r3)

The problem being that negative 32-bit values are being displayed in
full 64-bits.

The printf conversion was actually correct, we are passing unsigned
long so it should use "lx". But powerpc instructions are only 4 bytes
and the code only reads 4 bytes, so inst should really just be
unsigned int, and that also fixes the printing to look the way we
want:

  c00000002001e058  7ee00026      mfcr    r23
  c00000002001e05c  fae101a0      std     r23,416(r1)
  c00000002001e060  f8230000      std     r1,0(r3)

Fixes: e70d8f5526 ("powerpc/xmon: Add __printf annotation to xmon_printf()")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-07-17 21:18:14 +10:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ansidecl.h powerpc: Merge xmon 2005-10-28 22:53:37 +10:00
dis-asm.h [POWERPC] Make xmon disassembly optional 2006-12-04 20:40:32 +11:00
nonstdio.c powerpc/xmon: Paged output for paca display 2015-10-15 20:32:01 +11:00
nonstdio.h powerpc/xmon: Add __printf annotation to xmon_printf() 2018-05-25 12:04:36 +10:00
ppc-dis.c powerpc/xmon: Do not compute/store the major opcode 2018-01-21 23:37:43 +11:00
ppc-opc.c powerpc updates for 4.11 part 2 2017-03-01 10:10:16 -08:00
ppc.h powerpc/xmon: Enable disassembly files (compilation changes) 2017-02-15 20:02:42 +11:00
spr_access.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spu-dis.c powerpc/xmon: Add __printf annotation to xmon_printf() 2018-05-25 12:04:36 +10:00
spu-insns.h [POWERPC] Import spu disassembly code into xmon 2006-12-04 20:40:29 +11:00
spu-opc.c bug.h: add include of it to various implicit C users 2012-02-29 17:15:08 -05:00
spu.h [POWERPC] Import spu disassembly code into xmon 2006-12-04 20:40:29 +11:00
xmon.c powerpc/xmon: Fix disassembly since printf changes 2018-07-17 21:18:14 +10:00