xref: /openbmc/linux/arch/powerpc/xmon/dis-asm.h (revision e0426047)
1e0426047SMichael Ellerman #ifndef _POWERPC_XMON_DIS_ASM_H
2e0426047SMichael Ellerman #define _POWERPC_XMON_DIS_ASM_H
3e0426047SMichael Ellerman /*
4e0426047SMichael Ellerman  * Copyright (C) 2006 Michael Ellerman, IBM Corporation.
5e0426047SMichael Ellerman  *
6e0426047SMichael Ellerman  * This program is free software; you can redistribute it and/or
7e0426047SMichael Ellerman  * modify it under the terms of the GNU General Public License
8e0426047SMichael Ellerman  * as published by the Free Software Foundation; either version
9e0426047SMichael Ellerman  * 2 of the License, or (at your option) any later version.
10e0426047SMichael Ellerman  */
11e0426047SMichael Ellerman 
12e0426047SMichael Ellerman extern void print_address (unsigned long memaddr);
13e0426047SMichael Ellerman 
14e0426047SMichael Ellerman #ifdef CONFIG_XMON_DISASSEMBLY
15e0426047SMichael Ellerman extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr);
16e0426047SMichael Ellerman extern int print_insn_spu(unsigned long insn, unsigned long memaddr);
17e0426047SMichael Ellerman #else
18e0426047SMichael Ellerman static inline int print_insn_powerpc(unsigned long insn, unsigned long memaddr)
19e0426047SMichael Ellerman {
20e0426047SMichael Ellerman 	printf("%.8x", insn);
21e0426047SMichael Ellerman 	return 0;
22e0426047SMichael Ellerman }
23e0426047SMichael Ellerman 
24e0426047SMichael Ellerman static inline int print_insn_spu(unsigned long insn, unsigned long memaddr)
25e0426047SMichael Ellerman {
26e0426047SMichael Ellerman 	printf("%.8x", insn);
27e0426047SMichael Ellerman 	return 0;
28e0426047SMichael Ellerman }
29e0426047SMichael Ellerman #endif
30e0426047SMichael Ellerman 
31e0426047SMichael Ellerman #endif /* _POWERPC_XMON_DIS_ASM_H */
32