Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Fix xmon disassembler for little-endian

This patch fixes the disassembler of the powerpc kernel debugger xmon,
for little-endian.

Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Philippe Bergheaud and committed by
Benjamin Herrenschmidt
72eceef6 10862a0c

+4
+4
arch/powerpc/xmon/xmon.c
··· 171 171 #define REG "%.8lx" 172 172 #endif 173 173 174 + #ifdef __LITTLE_ENDIAN__ 175 + #define GETWORD(v) (((v)[3] << 24) + ((v)[2] << 16) + ((v)[1] << 8) + (v)[0]) 176 + #else 174 177 #define GETWORD(v) (((v)[0] << 24) + ((v)[1] << 16) + ((v)[2] << 8) + (v)[3]) 178 + #endif 175 179 176 180 #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ 177 181 || ('a' <= (c) && (c) <= 'f') \