| /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| * Copyright (C) 2016 Imagination Technologies |
| * Author: Marcin Nowakowski <marcin.nowakowski@mips.com> |
| #ifndef __PROBES_COMMON_H |
| #define __PROBES_COMMON_H |
| int __insn_is_compact_branch(union mips_instruction insn); |
| static inline int __insn_has_delay_slot(const union mips_instruction insn) |
| switch (insn.i_format.opcode) { |
| * jr and jalr are in r_format format. |
| switch (insn.r_format.func) { |
| * bltz_op, bgez_op, bltzl_op, bgezl_op, |
| * bltzal_op, bgezal_op, bltzall_op, bgezall_op. |
| switch (insn.i_format.rt) { |
| * These are unconditional and in j_format. |
| case blez_op: /* not really i_format */ |
| * And now the FPA/cp1 branch instructions. |
| #ifdef CONFIG_CPU_CAVIUM_OCTEON |
| case lwc2_op: /* This is bbit0 on Octeon */ |
| case ldc2_op: /* This is bbit032 on Octeon */ |
| case swc2_op: /* This is bbit1 on Octeon */ |
| case sdc2_op: /* This is bbit132 on Octeon */ |
| #endif /* __PROBES_COMMON_H */ |