Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Michael Ellerman | e042604 | 2006-11-23 00:46:45 +0100 | [diff] [blame] | 2 | #ifndef _POWERPC_XMON_DIS_ASM_H |
| 3 | #define _POWERPC_XMON_DIS_ASM_H |
| 4 | /* |
| 5 | * Copyright (C) 2006 Michael Ellerman, IBM Corporation. |
Michael Ellerman | e042604 | 2006-11-23 00:46:45 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | extern void print_address (unsigned long memaddr); |
| 9 | |
| 10 | #ifdef CONFIG_XMON_DISASSEMBLY |
| 11 | extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr); |
| 12 | extern int print_insn_spu(unsigned long insn, unsigned long memaddr); |
| 13 | #else |
| 14 | static inline int print_insn_powerpc(unsigned long insn, unsigned long memaddr) |
| 15 | { |
Sukadev Bhattiprolu | 493a55f | 2020-01-22 18:57:18 -0600 | [diff] [blame] | 16 | printf("%.8lx", insn); |
Michael Ellerman | e042604 | 2006-11-23 00:46:45 +0100 | [diff] [blame] | 17 | return 0; |
| 18 | } |
| 19 | |
| 20 | static inline int print_insn_spu(unsigned long insn, unsigned long memaddr) |
| 21 | { |
Sukadev Bhattiprolu | 493a55f | 2020-01-22 18:57:18 -0600 | [diff] [blame] | 22 | printf("%.8lx", insn); |
Michael Ellerman | e042604 | 2006-11-23 00:46:45 +0100 | [diff] [blame] | 23 | return 0; |
| 24 | } |
| 25 | #endif |
| 26 | |
| 27 | #endif /* _POWERPC_XMON_DIS_ASM_H */ |