/src/capstonenext/Mapping.h
| Line | Count | Source (jump to first uncovered line) | 
| 1 |  | /* Capstone Disassembly Engine */ | 
| 2 |  | /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2019 */ | 
| 3 |  | /*    Rot127 <unisono@quyllur.org>, 2022-2023 */ | 
| 4 |  |  | 
| 5 |  | #ifndef CS_MAPPING_H | 
| 6 |  | #define CS_MAPPING_H | 
| 7 |  |  | 
| 8 |  | #if defined(CAPSTONE_HAS_OSXKERNEL) | 
| 9 |  | #include <libkern/libkern.h> | 
| 10 |  | #else | 
| 11 |  | #include "include/capstone/capstone.h" | 
| 12 |  | #include <stddef.h> | 
| 13 |  | #endif | 
| 14 |  | #include "cs_priv.h" | 
| 15 |  | #include <assert.h> | 
| 16 |  | #include <string.h> | 
| 17 |  |  | 
| 18 |  | // map instruction to its characteristics | 
| 19 |  | typedef struct insn_map { | 
| 20 |  |   unsigned short id;        // The LLVM instruction id | 
| 21 |  |   unsigned short mapid;       // The Capstone instruction id | 
| 22 |  | #ifndef CAPSTONE_DIET | 
| 23 |  |   uint16_t regs_use[MAX_IMPL_R_REGS]; ///< list of implicit registers used by | 
| 24 |  |               ///< this instruction | 
| 25 |  |   uint16_t regs_mod[MAX_IMPL_W_REGS]; ///< list of implicit registers modified | 
| 26 |  |               ///< by this instruction | 
| 27 |  |   unsigned char groups | 
| 28 |  |     [MAX_NUM_GROUPS]; ///< list of group this instruction belong to | 
| 29 |  |   bool branch;      // branch instruction? | 
| 30 |  |   bool indirect_branch;   // indirect branch instruction? | 
| 31 |  |   union { | 
| 32 |  |     ppc_suppl_info ppc; | 
| 33 |  |   } suppl_info; // Supplementary information for each instruction. | 
| 34 |  | #endif | 
| 35 |  | } insn_map; | 
| 36 |  |  | 
| 37 |  | // look for @id in @m, given its size in @max. first time call will update | 
| 38 |  | // @cache. return 0 if not found | 
| 39 |  | unsigned short insn_find(const insn_map *m, unsigned int max, unsigned int id, | 
| 40 |  |        unsigned short **cache); | 
| 41 |  |  | 
| 42 |  | unsigned int find_cs_id(unsigned MC_Opcode, const insn_map *imap, | 
| 43 |  |       unsigned imap_size); | 
| 44 |  |  | 
| 45 |  | #define MAX_NO_DATA_TYPES 10 | 
| 46 |  |  | 
| 47 |  | ///< A LLVM<->CS Mapping entry of an MCOperand. | 
| 48 |  | typedef struct { | 
| 49 |  |   uint8_t /* cs_op_type */ type;   ///< Operand type (e.g.: reg, imm, mem) | 
| 50 |  |   uint8_t /* cs_ac_type */ access; ///< The access type (read, write) | 
| 51 |  |   uint8_t        /* cs_data_type */ | 
| 52 |  |     dtypes[MAX_NO_DATA_TYPES]; ///< List of op types. Terminated by | 
| 53 |  |              ///< CS_DATA_TYPE_LAST | 
| 54 |  | } mapping_op; | 
| 55 |  |  | 
| 56 |  | #define MAX_NO_INSN_MAP_OPS 16 | 
| 57 |  |  | 
| 58 |  | ///< MCOperands of an instruction. | 
| 59 |  | typedef struct { | 
| 60 |  |   mapping_op | 
| 61 |  |     ops[MAX_NO_INSN_MAP_OPS]; ///< NULL terminated array of insn_op. | 
| 62 |  | } map_insn_ops; | 
| 63 |  |  | 
| 64 |  | /// Only usable by `auto-sync` archs! | 
| 65 |  | const cs_op_type mapping_get_op_type(MCInst *MI, unsigned OpNum, | 
| 66 |  |              const map_insn_ops *insn_ops_map, | 
| 67 |  |              size_t map_size); | 
| 68 |  |  | 
| 69 |  | /// Only usable by `auto-sync` archs! | 
| 70 |  | const cs_ac_type mapping_get_op_access(MCInst *MI, unsigned OpNum, | 
| 71 |  |                const map_insn_ops *insn_ops_map, | 
| 72 |  |                size_t map_size); | 
| 73 |  |  | 
| 74 |  | /// Macro for easier access of operand types from the map. | 
| 75 |  | /// Assumes the istruction operands map is called "insn_operands" | 
| 76 |  | /// Only usable by `auto-sync` archs! | 
| 77 |  | #define map_get_op_type(MI, OpNum) \ | 
| 78 | 5.23M |   mapping_get_op_type(MI, OpNum, (const map_insn_ops *)insn_operands, \ | 
| 79 | 5.23M |           sizeof(insn_operands) / sizeof(insn_operands[0])) | 
| 80 |  |  | 
| 81 |  | /// Macro for easier access of operand access flags from the map. | 
| 82 |  | /// Assumes the istruction operands map is called "insn_operands" | 
| 83 |  | /// Only usable by `auto-sync` archs! | 
| 84 |  | #define map_get_op_access(MI, OpNum) \ | 
| 85 | 3.77M |   mapping_get_op_access(MI, OpNum, (const map_insn_ops *)insn_operands, \ | 
| 86 | 3.77M |             sizeof(insn_operands) / \ | 
| 87 | 3.77M |               sizeof(insn_operands[0])) | 
| 88 |  |  | 
| 89 |  | ///< Map for ids to their string | 
| 90 |  | typedef struct name_map { | 
| 91 |  |   unsigned int id; | 
| 92 |  |   const char *name; | 
| 93 |  | } name_map; | 
| 94 |  |  | 
| 95 |  | // map a name to its ID | 
| 96 |  | // return 0 if not found | 
| 97 |  | int name2id(const name_map *map, int max, const char *name); | 
| 98 |  |  | 
| 99 |  | // map ID to a name | 
| 100 |  | // return NULL if not found | 
| 101 |  | const char *id2name(const name_map *map, int max, const unsigned int id); | 
| 102 |  |  | 
| 103 |  | void map_add_implicit_write(MCInst *MI, uint32_t Reg); | 
| 104 |  | void map_add_implicit_read(MCInst *MI, uint32_t Reg); | 
| 105 |  | void map_remove_implicit_write(MCInst *MI, uint32_t Reg); | 
| 106 |  |  | 
| 107 |  | void map_implicit_reads(MCInst *MI, const insn_map *imap); | 
| 108 |  |  | 
| 109 |  | void map_implicit_writes(MCInst *MI, const insn_map *imap); | 
| 110 |  |  | 
| 111 |  | void add_group(MCInst *MI, unsigned /* arch_group */ group); | 
| 112 |  |  | 
| 113 |  | void map_groups(MCInst *MI, const insn_map *imap); | 
| 114 |  |  | 
| 115 |  | void map_cs_id(MCInst *MI, const insn_map *imap, unsigned int imap_size); | 
| 116 |  |  | 
| 117 |  | #define DECL_get_detail_op(arch, ARCH) \ | 
| 118 |  |   cs_##arch##_op *ARCH##_get_detail_op(MCInst *MI, int offset); | 
| 119 |  |  | 
| 120 |  | DECL_get_detail_op(arm, ARM); | 
| 121 |  | DECL_get_detail_op(ppc, PPC); | 
| 122 |  | DECL_get_detail_op(tricore, TriCore); | 
| 123 |  |  | 
| 124 |  | /// Increments the detail->arch.op_count by one. | 
| 125 |  | #define DEFINE_inc_detail_op_count(arch, ARCH) \ | 
| 126 |  |   static inline void ARCH##_inc_op_count(MCInst *MI) \ | 
| 127 | 3.41M |   { \ | 
| 128 | 3.41M |     MI->flat_insn->detail->arch.op_count++; \ | 
| 129 | 3.41M |   } ARMMapping.c:ARM_inc_op_count| Line | Count | Source |  | 127 | 3.25M |   { \ |  | 128 | 3.25M |     MI->flat_insn->detail->arch.op_count++; \ |  | 129 | 3.25M |   } | 
Unexecuted instantiation: ARMMapping.c:PPC_inc_op_countUnexecuted instantiation: ARMMapping.c:TriCore_inc_op_countUnexecuted instantiation: AArch64Mapping.c:ARM_inc_op_countUnexecuted instantiation: AArch64Mapping.c:PPC_inc_op_countUnexecuted instantiation: AArch64Mapping.c:TriCore_inc_op_countUnexecuted instantiation: MipsMapping.c:ARM_inc_op_countUnexecuted instantiation: MipsMapping.c:PPC_inc_op_countUnexecuted instantiation: MipsMapping.c:TriCore_inc_op_countPPCMapping.c:PPC_inc_op_count| Line | Count | Source |  | 127 | 162k |   { \ |  | 128 | 162k |     MI->flat_insn->detail->arch.op_count++; \ |  | 129 | 162k |   } | 
Unexecuted instantiation: PPCMapping.c:ARM_inc_op_countUnexecuted instantiation: PPCMapping.c:TriCore_inc_op_countUnexecuted instantiation: X86Mapping.c:ARM_inc_op_countUnexecuted instantiation: X86Mapping.c:PPC_inc_op_countUnexecuted instantiation: X86Mapping.c:TriCore_inc_op_countUnexecuted instantiation: SparcMapping.c:ARM_inc_op_countUnexecuted instantiation: SparcMapping.c:PPC_inc_op_countUnexecuted instantiation: SparcMapping.c:TriCore_inc_op_countUnexecuted instantiation: SystemZMapping.c:ARM_inc_op_countUnexecuted instantiation: SystemZMapping.c:PPC_inc_op_countUnexecuted instantiation: SystemZMapping.c:TriCore_inc_op_countUnexecuted instantiation: XCoreMapping.c:ARM_inc_op_countUnexecuted instantiation: XCoreMapping.c:PPC_inc_op_countUnexecuted instantiation: XCoreMapping.c:TriCore_inc_op_countUnexecuted instantiation: M68KInstPrinter.c:ARM_inc_op_countUnexecuted instantiation: M68KInstPrinter.c:PPC_inc_op_countUnexecuted instantiation: M68KInstPrinter.c:TriCore_inc_op_countUnexecuted instantiation: TMS320C64xMapping.c:ARM_inc_op_countUnexecuted instantiation: TMS320C64xMapping.c:PPC_inc_op_countUnexecuted instantiation: TMS320C64xMapping.c:TriCore_inc_op_countUnexecuted instantiation: M680XInstPrinter.c:ARM_inc_op_countUnexecuted instantiation: M680XInstPrinter.c:PPC_inc_op_countUnexecuted instantiation: M680XInstPrinter.c:TriCore_inc_op_countUnexecuted instantiation: EVMMapping.c:ARM_inc_op_countUnexecuted instantiation: EVMMapping.c:PPC_inc_op_countUnexecuted instantiation: EVMMapping.c:TriCore_inc_op_countUnexecuted instantiation: WASMMapping.c:ARM_inc_op_countUnexecuted instantiation: WASMMapping.c:PPC_inc_op_countUnexecuted instantiation: WASMMapping.c:TriCore_inc_op_countUnexecuted instantiation: BPFMapping.c:ARM_inc_op_countUnexecuted instantiation: BPFMapping.c:PPC_inc_op_countUnexecuted instantiation: BPFMapping.c:TriCore_inc_op_countUnexecuted instantiation: RISCVMapping.c:ARM_inc_op_countUnexecuted instantiation: RISCVMapping.c:PPC_inc_op_countUnexecuted instantiation: RISCVMapping.c:TriCore_inc_op_countUnexecuted instantiation: SHInstPrinter.c:ARM_inc_op_countUnexecuted instantiation: SHInstPrinter.c:PPC_inc_op_countUnexecuted instantiation: SHInstPrinter.c:TriCore_inc_op_countUnexecuted instantiation: TriCoreMapping.c:ARM_inc_op_countUnexecuted instantiation: TriCoreMapping.c:PPC_inc_op_countUnexecuted instantiation: TriCoreMapping.c:TriCore_inc_op_countUnexecuted instantiation: Mapping.c:ARM_inc_op_countUnexecuted instantiation: Mapping.c:PPC_inc_op_countUnexecuted instantiation: Mapping.c:TriCore_inc_op_countUnexecuted instantiation: ARMInstPrinter.c:ARM_inc_op_countUnexecuted instantiation: ARMInstPrinter.c:PPC_inc_op_countUnexecuted instantiation: ARMInstPrinter.c:TriCore_inc_op_countUnexecuted instantiation: PPCInstPrinter.c:ARM_inc_op_countUnexecuted instantiation: PPCInstPrinter.c:PPC_inc_op_countUnexecuted instantiation: PPCInstPrinter.c:TriCore_inc_op_countUnexecuted instantiation: TriCoreInstPrinter.c:TriCore_inc_op_countUnexecuted instantiation: TriCoreInstPrinter.c:ARM_inc_op_countUnexecuted instantiation: TriCoreInstPrinter.c:PPC_inc_op_count | 
| 130 |  |  | 
| 131 |  | /// Decrements the detail->arch.op_count by one. | 
| 132 |  | #define DEFINE_dec_detail_op_count(arch, ARCH) \ | 
| 133 |  |   static inline void ARCH##_dec_op_count(MCInst *MI) \ | 
| 134 | 69.7k |   { \ | 
| 135 | 69.7k |     MI->flat_insn->detail->arch.op_count--; \ | 
| 136 | 69.7k |   } ARMMapping.c:ARM_dec_op_count| Line | Count | Source |  | 134 | 69.7k |   { \ |  | 135 | 69.7k |     MI->flat_insn->detail->arch.op_count--; \ |  | 136 | 69.7k |   } | 
Unexecuted instantiation: ARMMapping.c:PPC_dec_op_countUnexecuted instantiation: ARMMapping.c:TriCore_dec_op_countUnexecuted instantiation: AArch64Mapping.c:ARM_dec_op_countUnexecuted instantiation: AArch64Mapping.c:PPC_dec_op_countUnexecuted instantiation: AArch64Mapping.c:TriCore_dec_op_countUnexecuted instantiation: MipsMapping.c:ARM_dec_op_countUnexecuted instantiation: MipsMapping.c:PPC_dec_op_countUnexecuted instantiation: MipsMapping.c:TriCore_dec_op_countUnexecuted instantiation: PPCMapping.c:ARM_dec_op_countUnexecuted instantiation: PPCMapping.c:PPC_dec_op_countUnexecuted instantiation: PPCMapping.c:TriCore_dec_op_countUnexecuted instantiation: X86Mapping.c:ARM_dec_op_countUnexecuted instantiation: X86Mapping.c:PPC_dec_op_countUnexecuted instantiation: X86Mapping.c:TriCore_dec_op_countUnexecuted instantiation: SparcMapping.c:ARM_dec_op_countUnexecuted instantiation: SparcMapping.c:PPC_dec_op_countUnexecuted instantiation: SparcMapping.c:TriCore_dec_op_countUnexecuted instantiation: SystemZMapping.c:ARM_dec_op_countUnexecuted instantiation: SystemZMapping.c:PPC_dec_op_countUnexecuted instantiation: SystemZMapping.c:TriCore_dec_op_countUnexecuted instantiation: XCoreMapping.c:ARM_dec_op_countUnexecuted instantiation: XCoreMapping.c:PPC_dec_op_countUnexecuted instantiation: XCoreMapping.c:TriCore_dec_op_countUnexecuted instantiation: M68KInstPrinter.c:ARM_dec_op_countUnexecuted instantiation: M68KInstPrinter.c:PPC_dec_op_countUnexecuted instantiation: M68KInstPrinter.c:TriCore_dec_op_countUnexecuted instantiation: TMS320C64xMapping.c:ARM_dec_op_countUnexecuted instantiation: TMS320C64xMapping.c:PPC_dec_op_countUnexecuted instantiation: TMS320C64xMapping.c:TriCore_dec_op_countUnexecuted instantiation: M680XInstPrinter.c:ARM_dec_op_countUnexecuted instantiation: M680XInstPrinter.c:PPC_dec_op_countUnexecuted instantiation: M680XInstPrinter.c:TriCore_dec_op_countUnexecuted instantiation: EVMMapping.c:ARM_dec_op_countUnexecuted instantiation: EVMMapping.c:PPC_dec_op_countUnexecuted instantiation: EVMMapping.c:TriCore_dec_op_countUnexecuted instantiation: WASMMapping.c:ARM_dec_op_countUnexecuted instantiation: WASMMapping.c:PPC_dec_op_countUnexecuted instantiation: WASMMapping.c:TriCore_dec_op_countUnexecuted instantiation: BPFMapping.c:ARM_dec_op_countUnexecuted instantiation: BPFMapping.c:PPC_dec_op_countUnexecuted instantiation: BPFMapping.c:TriCore_dec_op_countUnexecuted instantiation: RISCVMapping.c:ARM_dec_op_countUnexecuted instantiation: RISCVMapping.c:PPC_dec_op_countUnexecuted instantiation: RISCVMapping.c:TriCore_dec_op_countUnexecuted instantiation: SHInstPrinter.c:ARM_dec_op_countUnexecuted instantiation: SHInstPrinter.c:PPC_dec_op_countUnexecuted instantiation: SHInstPrinter.c:TriCore_dec_op_countUnexecuted instantiation: TriCoreMapping.c:ARM_dec_op_countUnexecuted instantiation: TriCoreMapping.c:PPC_dec_op_countUnexecuted instantiation: TriCoreMapping.c:TriCore_dec_op_countUnexecuted instantiation: Mapping.c:ARM_dec_op_countUnexecuted instantiation: Mapping.c:PPC_dec_op_countUnexecuted instantiation: Mapping.c:TriCore_dec_op_countUnexecuted instantiation: ARMInstPrinter.c:ARM_dec_op_countUnexecuted instantiation: ARMInstPrinter.c:PPC_dec_op_countUnexecuted instantiation: ARMInstPrinter.c:TriCore_dec_op_countUnexecuted instantiation: PPCInstPrinter.c:ARM_dec_op_countUnexecuted instantiation: PPCInstPrinter.c:PPC_dec_op_countUnexecuted instantiation: PPCInstPrinter.c:TriCore_dec_op_countUnexecuted instantiation: TriCoreInstPrinter.c:ARM_dec_op_countUnexecuted instantiation: TriCoreInstPrinter.c:PPC_dec_op_countUnexecuted instantiation: TriCoreInstPrinter.c:TriCore_dec_op_count | 
| 137 |  |  | 
| 138 |  | DEFINE_inc_detail_op_count(arm, ARM); | 
| 139 |  | DEFINE_dec_detail_op_count(arm, ARM); | 
| 140 |  | DEFINE_inc_detail_op_count(ppc, PPC); | 
| 141 |  | DEFINE_dec_detail_op_count(ppc, PPC); | 
| 142 |  | DEFINE_inc_detail_op_count(tricore, TriCore); | 
| 143 |  | DEFINE_dec_detail_op_count(tricore, TriCore); | 
| 144 |  |  | 
| 145 |  | /// Returns true if a memory operand is currently edited. | 
| 146 |  | static inline bool doing_mem(const MCInst *MI) | 
| 147 | 2.63M | { | 
| 148 | 2.63M |   return MI->csh->doing_mem; | 
| 149 | 2.63M | } | Line | Count | Source |  | 147 | 2.29M | { |  | 148 | 2.29M |   return MI->csh->doing_mem; |  | 149 | 2.29M | } | 
Unexecuted instantiation: AArch64Mapping.c:doing_memUnexecuted instantiation: MipsMapping.c:doing_mem| Line | Count | Source |  | 147 | 335k | { |  | 148 | 335k |   return MI->csh->doing_mem; |  | 149 | 335k | } | 
Unexecuted instantiation: X86Mapping.c:doing_memUnexecuted instantiation: SparcMapping.c:doing_memUnexecuted instantiation: SystemZMapping.c:doing_memUnexecuted instantiation: XCoreMapping.c:doing_memUnexecuted instantiation: M68KInstPrinter.c:doing_memUnexecuted instantiation: TMS320C64xMapping.c:doing_memUnexecuted instantiation: M680XInstPrinter.c:doing_memUnexecuted instantiation: EVMMapping.c:doing_memUnexecuted instantiation: WASMMapping.c:doing_memUnexecuted instantiation: BPFMapping.c:doing_memUnexecuted instantiation: RISCVMapping.c:doing_memUnexecuted instantiation: SHInstPrinter.c:doing_memUnexecuted instantiation: TriCoreMapping.c:doing_memUnexecuted instantiation: Mapping.c:doing_memUnexecuted instantiation: ARMInstPrinter.c:doing_memUnexecuted instantiation: PPCInstPrinter.c:doing_memUnexecuted instantiation: TriCoreInstPrinter.c:doing_mem | 
| 150 |  |  | 
| 151 |  | /// Sets the doing_mem flag to @status. | 
| 152 |  | static inline void set_doing_mem(const MCInst *MI, bool status) | 
| 153 | 761k | { | 
| 154 | 761k |   MI->csh->doing_mem = status; | 
| 155 | 761k | } ARMMapping.c:set_doing_mem| Line | Count | Source |  | 153 | 727k | { |  | 154 | 727k |   MI->csh->doing_mem = status; |  | 155 | 727k | } | 
Unexecuted instantiation: AArch64Mapping.c:set_doing_memUnexecuted instantiation: MipsMapping.c:set_doing_memPPCMapping.c:set_doing_mem| Line | Count | Source |  | 153 | 33.6k | { |  | 154 | 33.6k |   MI->csh->doing_mem = status; |  | 155 | 33.6k | } | 
Unexecuted instantiation: X86Mapping.c:set_doing_memUnexecuted instantiation: SparcMapping.c:set_doing_memUnexecuted instantiation: SystemZMapping.c:set_doing_memUnexecuted instantiation: XCoreMapping.c:set_doing_memUnexecuted instantiation: M68KInstPrinter.c:set_doing_memUnexecuted instantiation: TMS320C64xMapping.c:set_doing_memUnexecuted instantiation: M680XInstPrinter.c:set_doing_memUnexecuted instantiation: EVMMapping.c:set_doing_memUnexecuted instantiation: WASMMapping.c:set_doing_memUnexecuted instantiation: BPFMapping.c:set_doing_memUnexecuted instantiation: RISCVMapping.c:set_doing_memUnexecuted instantiation: SHInstPrinter.c:set_doing_memUnexecuted instantiation: TriCoreMapping.c:set_doing_memUnexecuted instantiation: Mapping.c:set_doing_memUnexecuted instantiation: ARMInstPrinter.c:set_doing_memUnexecuted instantiation: PPCInstPrinter.c:set_doing_memUnexecuted instantiation: TriCoreInstPrinter.c:set_doing_mem | 
| 156 |  |  | 
| 157 |  | /// Returns detail->arch | 
| 158 |  | #define DEFINE_get_arch_detail(arch, ARCH) \ | 
| 159 |  |   static inline cs_##arch *ARCH##_get_detail(const MCInst *MI) \ | 
| 160 | 59.0M |   { \ | 
| 161 | 59.0M |     assert(MI && MI->flat_insn && MI->flat_insn->detail); \ | 
| 162 | 59.0M |     return &MI->flat_insn->detail->arch; \ | 
| 163 | 59.0M |   } ARMMapping.c:ARM_get_detail| Line | Count | Source |  | 160 | 58.5M |   { \ |  | 161 | 58.5M |     assert(MI && MI->flat_insn && MI->flat_insn->detail); \ |  | 162 | 58.5M |     return &MI->flat_insn->detail->arch; \ |  | 163 | 58.5M |   } | 
Unexecuted instantiation: ARMMapping.c:PPC_get_detailUnexecuted instantiation: ARMMapping.c:TriCore_get_detailUnexecuted instantiation: AArch64Mapping.c:ARM_get_detailUnexecuted instantiation: AArch64Mapping.c:PPC_get_detailUnexecuted instantiation: AArch64Mapping.c:TriCore_get_detailUnexecuted instantiation: MipsMapping.c:ARM_get_detailUnexecuted instantiation: MipsMapping.c:PPC_get_detailUnexecuted instantiation: MipsMapping.c:TriCore_get_detailPPCMapping.c:PPC_get_detail| Line | Count | Source |  | 160 | 570k |   { \ |  | 161 | 570k |     assert(MI && MI->flat_insn && MI->flat_insn->detail); \ |  | 162 | 570k |     return &MI->flat_insn->detail->arch; \ |  | 163 | 570k |   } | 
Unexecuted instantiation: PPCMapping.c:ARM_get_detailUnexecuted instantiation: PPCMapping.c:TriCore_get_detailUnexecuted instantiation: X86Mapping.c:ARM_get_detailUnexecuted instantiation: X86Mapping.c:PPC_get_detailUnexecuted instantiation: X86Mapping.c:TriCore_get_detailUnexecuted instantiation: SparcMapping.c:ARM_get_detailUnexecuted instantiation: SparcMapping.c:PPC_get_detailUnexecuted instantiation: SparcMapping.c:TriCore_get_detailUnexecuted instantiation: SystemZMapping.c:ARM_get_detailUnexecuted instantiation: SystemZMapping.c:PPC_get_detailUnexecuted instantiation: SystemZMapping.c:TriCore_get_detailUnexecuted instantiation: XCoreMapping.c:ARM_get_detailUnexecuted instantiation: XCoreMapping.c:PPC_get_detailUnexecuted instantiation: XCoreMapping.c:TriCore_get_detailUnexecuted instantiation: M68KInstPrinter.c:ARM_get_detailUnexecuted instantiation: M68KInstPrinter.c:PPC_get_detailUnexecuted instantiation: M68KInstPrinter.c:TriCore_get_detailUnexecuted instantiation: TMS320C64xMapping.c:ARM_get_detailUnexecuted instantiation: TMS320C64xMapping.c:PPC_get_detailUnexecuted instantiation: TMS320C64xMapping.c:TriCore_get_detailUnexecuted instantiation: M680XInstPrinter.c:ARM_get_detailUnexecuted instantiation: M680XInstPrinter.c:PPC_get_detailUnexecuted instantiation: M680XInstPrinter.c:TriCore_get_detailUnexecuted instantiation: EVMMapping.c:ARM_get_detailUnexecuted instantiation: EVMMapping.c:PPC_get_detailUnexecuted instantiation: EVMMapping.c:TriCore_get_detailUnexecuted instantiation: WASMMapping.c:ARM_get_detailUnexecuted instantiation: WASMMapping.c:PPC_get_detailUnexecuted instantiation: WASMMapping.c:TriCore_get_detailUnexecuted instantiation: BPFMapping.c:ARM_get_detailUnexecuted instantiation: BPFMapping.c:PPC_get_detailUnexecuted instantiation: BPFMapping.c:TriCore_get_detailUnexecuted instantiation: RISCVMapping.c:ARM_get_detailUnexecuted instantiation: RISCVMapping.c:PPC_get_detailUnexecuted instantiation: RISCVMapping.c:TriCore_get_detailUnexecuted instantiation: SHInstPrinter.c:ARM_get_detailUnexecuted instantiation: SHInstPrinter.c:PPC_get_detailUnexecuted instantiation: SHInstPrinter.c:TriCore_get_detailUnexecuted instantiation: TriCoreMapping.c:ARM_get_detailUnexecuted instantiation: TriCoreMapping.c:PPC_get_detailUnexecuted instantiation: TriCoreMapping.c:TriCore_get_detailUnexecuted instantiation: Mapping.c:ARM_get_detailUnexecuted instantiation: Mapping.c:PPC_get_detailUnexecuted instantiation: Mapping.c:TriCore_get_detailUnexecuted instantiation: ARMInstPrinter.c:ARM_get_detailUnexecuted instantiation: ARMInstPrinter.c:PPC_get_detailUnexecuted instantiation: ARMInstPrinter.c:TriCore_get_detailUnexecuted instantiation: PPCInstPrinter.c:ARM_get_detailUnexecuted instantiation: PPCInstPrinter.c:PPC_get_detailUnexecuted instantiation: PPCInstPrinter.c:TriCore_get_detailUnexecuted instantiation: TriCoreInstPrinter.c:TriCore_get_detailUnexecuted instantiation: TriCoreInstPrinter.c:ARM_get_detailUnexecuted instantiation: TriCoreInstPrinter.c:PPC_get_detail | 
| 164 |  |  | 
| 165 |  | DEFINE_get_arch_detail(arm, ARM); | 
| 166 |  | DEFINE_get_arch_detail(ppc, PPC); | 
| 167 |  | DEFINE_get_arch_detail(tricore, TriCore); | 
| 168 |  |  | 
| 169 |  | static inline bool detail_is_set(const MCInst *MI) | 
| 170 | 18.8M | { | 
| 171 | 18.8M |   assert(MI && MI->flat_insn); | 
| 172 | 18.8M |   return MI->flat_insn->detail != NULL && MI->csh->detail_opt & CS_OPT_ON; | 
| 173 | 18.8M | } ARMMapping.c:detail_is_set| Line | Count | Source |  | 170 | 17.8M | { |  | 171 | 17.8M |   assert(MI && MI->flat_insn); |  | 172 | 17.8M |   return MI->flat_insn->detail != NULL && MI->csh->detail_opt & CS_OPT_ON; |  | 173 | 17.8M | } | 
Unexecuted instantiation: AArch64Mapping.c:detail_is_setUnexecuted instantiation: MipsMapping.c:detail_is_setPPCMapping.c:detail_is_set| Line | Count | Source |  | 170 | 856k | { |  | 171 | 856k |   assert(MI && MI->flat_insn); |  | 172 | 856k |   return MI->flat_insn->detail != NULL && MI->csh->detail_opt & CS_OPT_ON; |  | 173 | 856k | } | 
Unexecuted instantiation: X86Mapping.c:detail_is_setUnexecuted instantiation: SparcMapping.c:detail_is_setUnexecuted instantiation: SystemZMapping.c:detail_is_setUnexecuted instantiation: XCoreMapping.c:detail_is_setUnexecuted instantiation: M68KInstPrinter.c:detail_is_setUnexecuted instantiation: TMS320C64xMapping.c:detail_is_setUnexecuted instantiation: M680XInstPrinter.c:detail_is_setUnexecuted instantiation: EVMMapping.c:detail_is_setUnexecuted instantiation: WASMMapping.c:detail_is_setUnexecuted instantiation: BPFMapping.c:detail_is_setUnexecuted instantiation: RISCVMapping.c:detail_is_setUnexecuted instantiation: SHInstPrinter.c:detail_is_setUnexecuted instantiation: TriCoreMapping.c:detail_is_set| Line | Count | Source |  | 170 | 114k | { |  | 171 | 114k |   assert(MI && MI->flat_insn); |  | 172 | 114k |   return MI->flat_insn->detail != NULL && MI->csh->detail_opt & CS_OPT_ON; |  | 173 | 114k | } | 
Unexecuted instantiation: ARMInstPrinter.c:detail_is_setUnexecuted instantiation: PPCInstPrinter.c:detail_is_setUnexecuted instantiation: TriCoreInstPrinter.c:detail_is_set | 
| 174 |  |  | 
| 175 |  | static inline cs_detail *get_detail(const MCInst *MI) | 
| 176 | 2.57M | { | 
| 177 | 2.57M |   assert(MI && MI->flat_insn); | 
| 178 | 2.57M |   return MI->flat_insn->detail; | 
| 179 | 2.57M | } | Line | Count | Source |  | 176 | 2.44M | { |  | 177 | 2.44M |   assert(MI && MI->flat_insn); |  | 178 | 2.44M |   return MI->flat_insn->detail; |  | 179 | 2.44M | } | 
Unexecuted instantiation: AArch64Mapping.c:get_detailUnexecuted instantiation: MipsMapping.c:get_detail| Line | Count | Source |  | 176 | 129k | { |  | 177 | 129k |   assert(MI && MI->flat_insn); |  | 178 | 129k |   return MI->flat_insn->detail; |  | 179 | 129k | } | 
Unexecuted instantiation: X86Mapping.c:get_detailUnexecuted instantiation: SparcMapping.c:get_detailUnexecuted instantiation: SystemZMapping.c:get_detailUnexecuted instantiation: XCoreMapping.c:get_detailUnexecuted instantiation: M68KInstPrinter.c:get_detailUnexecuted instantiation: TMS320C64xMapping.c:get_detailUnexecuted instantiation: M680XInstPrinter.c:get_detailUnexecuted instantiation: EVMMapping.c:get_detailUnexecuted instantiation: WASMMapping.c:get_detailUnexecuted instantiation: BPFMapping.c:get_detailUnexecuted instantiation: RISCVMapping.c:get_detailUnexecuted instantiation: SHInstPrinter.c:get_detailUnexecuted instantiation: TriCoreMapping.c:get_detailUnexecuted instantiation: Mapping.c:get_detailUnexecuted instantiation: ARMInstPrinter.c:get_detailUnexecuted instantiation: PPCInstPrinter.c:get_detailUnexecuted instantiation: TriCoreInstPrinter.c:get_detail | 
| 180 |  |  | 
| 181 |  | static inline bool set_detail_ops(const MCInst *MI) | 
| 182 | 0 | { | 
| 183 | 0 |   assert(MI && MI->flat_insn); | 
| 184 | 0 |   return MI->fillDetailOps; | 
| 185 | 0 | } Unexecuted instantiation: ARMMapping.c:set_detail_opsUnexecuted instantiation: AArch64Mapping.c:set_detail_opsUnexecuted instantiation: MipsMapping.c:set_detail_opsUnexecuted instantiation: PPCMapping.c:set_detail_opsUnexecuted instantiation: X86Mapping.c:set_detail_opsUnexecuted instantiation: SparcMapping.c:set_detail_opsUnexecuted instantiation: SystemZMapping.c:set_detail_opsUnexecuted instantiation: XCoreMapping.c:set_detail_opsUnexecuted instantiation: M68KInstPrinter.c:set_detail_opsUnexecuted instantiation: TMS320C64xMapping.c:set_detail_opsUnexecuted instantiation: M680XInstPrinter.c:set_detail_opsUnexecuted instantiation: EVMMapping.c:set_detail_opsUnexecuted instantiation: WASMMapping.c:set_detail_opsUnexecuted instantiation: BPFMapping.c:set_detail_opsUnexecuted instantiation: RISCVMapping.c:set_detail_opsUnexecuted instantiation: SHInstPrinter.c:set_detail_opsUnexecuted instantiation: TriCoreMapping.c:set_detail_opsUnexecuted instantiation: Mapping.c:set_detail_opsUnexecuted instantiation: ARMInstPrinter.c:set_detail_opsUnexecuted instantiation: PPCInstPrinter.c:set_detail_opsUnexecuted instantiation: TriCoreInstPrinter.c:set_detail_ops | 
| 186 |  |  | 
| 187 |  | /// Returns if the given instruction is an alias instruction. | 
| 188 |  | #define RETURN_IF_INSN_IS_ALIAS(MI) \ | 
| 189 |  | do { \ | 
| 190 |  |   if (MI->isAliasInstr) \ | 
| 191 |  |     return; \ | 
| 192 |  | } while(0) | 
| 193 |  |  | 
| 194 |  | void map_set_fill_detail_ops(MCInst *MI, bool Val); | 
| 195 |  |  | 
| 196 | 193k | static inline bool map_fill_detail_ops(MCInst *MI) { | 
| 197 | 193k |   assert(MI); | 
| 198 | 193k |   return MI->fillDetailOps; | 
| 199 | 193k | } Unexecuted instantiation: ARMMapping.c:map_fill_detail_opsUnexecuted instantiation: AArch64Mapping.c:map_fill_detail_opsUnexecuted instantiation: MipsMapping.c:map_fill_detail_opsPPCMapping.c:map_fill_detail_ops| Line | Count | Source |  | 196 | 193k | static inline bool map_fill_detail_ops(MCInst *MI) { |  | 197 | 193k |   assert(MI); |  | 198 | 193k |   return MI->fillDetailOps; |  | 199 | 193k | } | 
Unexecuted instantiation: X86Mapping.c:map_fill_detail_opsUnexecuted instantiation: SparcMapping.c:map_fill_detail_opsUnexecuted instantiation: SystemZMapping.c:map_fill_detail_opsUnexecuted instantiation: XCoreMapping.c:map_fill_detail_opsUnexecuted instantiation: M68KInstPrinter.c:map_fill_detail_opsUnexecuted instantiation: TMS320C64xMapping.c:map_fill_detail_opsUnexecuted instantiation: M680XInstPrinter.c:map_fill_detail_opsUnexecuted instantiation: EVMMapping.c:map_fill_detail_opsUnexecuted instantiation: WASMMapping.c:map_fill_detail_opsUnexecuted instantiation: BPFMapping.c:map_fill_detail_opsUnexecuted instantiation: RISCVMapping.c:map_fill_detail_opsUnexecuted instantiation: SHInstPrinter.c:map_fill_detail_opsUnexecuted instantiation: TriCoreMapping.c:map_fill_detail_opsUnexecuted instantiation: Mapping.c:map_fill_detail_opsUnexecuted instantiation: ARMInstPrinter.c:map_fill_detail_opsUnexecuted instantiation: PPCInstPrinter.c:map_fill_detail_opsUnexecuted instantiation: TriCoreInstPrinter.c:map_fill_detail_ops | 
| 200 |  |  | 
| 201 |  | void map_set_is_alias_insn(MCInst *MI, bool Val, uint64_t Alias); | 
| 202 |  |  | 
| 203 |  | bool map_use_alias_details(const MCInst *MI); | 
| 204 |  |  | 
| 205 |  | void map_set_alias_id(MCInst *MI, const SStream *O, const name_map *alias_mnem_id_map, int map_size); | 
| 206 |  |  | 
| 207 |  | #endif // CS_MAPPING_H |