提交 72eceef6 编写于 作者: P Philippe Bergheaud 提交者: Benjamin Herrenschmidt

powerpc: Fix xmon disassembler for little-endian

This patch fixes the disassembler of the powerpc kernel debugger xmon,
for little-endian.
Signed-off-by: NPhilippe Bergheaud <felix@linux.vnet.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 10862a0c
...@@ -171,7 +171,11 @@ extern void xmon_leave(void); ...@@ -171,7 +171,11 @@ extern void xmon_leave(void);
#define REG "%.8lx" #define REG "%.8lx"
#endif #endif
#ifdef __LITTLE_ENDIAN__
#define GETWORD(v) (((v)[3] << 24) + ((v)[2] << 16) + ((v)[1] << 8) + (v)[0])
#else
#define GETWORD(v) (((v)[0] << 24) + ((v)[1] << 16) + ((v)[2] << 8) + (v)[3]) #define GETWORD(v) (((v)[0] << 24) + ((v)[1] << 16) + ((v)[2] << 8) + (v)[3])
#endif
#define isxdigit(c) (('0' <= (c) && (c) <= '9') \ #define isxdigit(c) (('0' <= (c) && (c) <= '9') \
|| ('a' <= (c) && (c) <= 'f') \ || ('a' <= (c) && (c) <= 'f') \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册