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

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

Version: ~ [ linux-4.18-rc1 ] ~ [ linux-4.17.2 ] ~ [ linux-4.16.16 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.50 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.109 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.138 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.113 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.57 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.27.62 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp