blob: c4c982d6402e73ff62d4d64c33c6de47707b034e [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Michael Ellermane0426042006-11-23 00:46:45 +01002#ifndef _POWERPC_XMON_DIS_ASM_H
3#define _POWERPC_XMON_DIS_ASM_H
4/*
5 * Copyright (C) 2006 Michael Ellerman, IBM Corporation.
Michael Ellermane0426042006-11-23 00:46:45 +01006 */
7
8extern void print_address (unsigned long memaddr);
9
10#ifdef CONFIG_XMON_DISASSEMBLY
11extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr);
12extern int print_insn_spu(unsigned long insn, unsigned long memaddr);
13#else
14static inline int print_insn_powerpc(unsigned long insn, unsigned long memaddr)
15{
Sukadev Bhattiprolu493a55f2020-01-22 18:57:18 -060016 printf("%.8lx", insn);
Michael Ellermane0426042006-11-23 00:46:45 +010017 return 0;
18}
19
20static inline int print_insn_spu(unsigned long insn, unsigned long memaddr)
21{
Sukadev Bhattiprolu493a55f2020-01-22 18:57:18 -060022 printf("%.8lx", insn);
Michael Ellermane0426042006-11-23 00:46:45 +010023 return 0;
24}
25#endif
26
27#endif /* _POWERPC_XMON_DIS_ASM_H */