~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/kernel/probes-common.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  * Copyright (C) 2016 Imagination Technologies
  4  * Author: Marcin Nowakowski <marcin.nowakowski@mips.com>
  5  */
  6 
  7 #ifndef __PROBES_COMMON_H
  8 #define __PROBES_COMMON_H
  9 
 10 #include <asm/inst.h>
 11 
 12 int __insn_is_compact_branch(union mips_instruction insn);
 13 
 14 static inline int __insn_has_delay_slot(const union mips_instruction insn)
 15 {
 16         switch (insn.i_format.opcode) {
 17         /*
 18          * jr and jalr are in r_format format.
 19          */
 20         case spec_op:
 21                 switch (insn.r_format.func) {
 22                 case jalr_op:
 23                 case jr_op:
 24                         return 1;
 25                 }
 26                 break;
 27 
 28         /*
 29          * This group contains:
 30          * bltz_op, bgez_op, bltzl_op, bgezl_op,
 31          * bltzal_op, bgezal_op, bltzall_op, bgezall_op.
 32          */
 33         case bcond_op:
 34                 switch (insn.i_format.rt) {
 35                 case bltz_op:
 36                 case bltzl_op:
 37                 case bgez_op:
 38                 case bgezl_op:
 39                 case bltzal_op:
 40                 case bltzall_op:
 41                 case bgezal_op:
 42                 case bgezall_op:
 43                 case bposge32_op:
 44                         return 1;
 45                 }
 46                 break;
 47 
 48         /*
 49          * These are unconditional and in j_format.
 50          */
 51         case jal_op:
 52         case j_op:
 53         case beq_op:
 54         case beql_op:
 55         case bne_op:
 56         case bnel_op:
 57         case blez_op: /* not really i_format */
 58         case blezl_op:
 59         case bgtz_op:
 60         case bgtzl_op:
 61                 return 1;
 62 
 63         /*
 64          * And now the FPA/cp1 branch instructions.
 65          */
 66         case cop1_op:
 67 #ifdef CONFIG_CPU_CAVIUM_OCTEON
 68         case lwc2_op: /* This is bbit0 on Octeon */
 69         case ldc2_op: /* This is bbit032 on Octeon */
 70         case swc2_op: /* This is bbit1 on Octeon */
 71         case sdc2_op: /* This is bbit132 on Octeon */
 72 #endif
 73                 return 1;
 74         }
 75 
 76         return 0;
 77 }
 78 
 79 #endif  /* __PROBES_COMMON_H */
 80 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php