| 1 | //===------ TriCoreDisassembler.cpp - Disassembler for TriCore --*- C++ -*-===//cxx . . $ `<file>/arch/TriCore/TriCoreDisassembler.c`/ |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | /* Capstone Disassembly Engine */ |
| 11 | /* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */ |
| 12 | |
| 13 | #ifdef CAPSTONE_HAS_TRICOREcxx . . $ `<built-in>:429:9`! |
| 14 | |
| 15 | #include <stdio.h> // DEBUG |
| 16 | #include <stdlib.h> |
| 17 | #include <string.h> |
| 18 | |
| 19 | #include "../../cs_priv.h"cxx . . $ `<file>/cs_priv.h`/ |
| 20 | #include "../../utils.h"cxx . . $ `<file>/utils.h`/ |
| 21 | |
| 22 | #include "../../MCInst.h"cxx . . $ `<file>/MCInst.h`/ |
| 23 | #include "../../MCInstrDesc.h"cxx . . $ `<file>/MCInstrDesc.h`/ |
| 24 | #include "../../MCFixedLenDisassembler.h"cxx . . $ `<file>/MCFixedLenDisassembler.h`/ |
| 25 | #include "../../MCRegisterInfo.h"cxx . . $ `<file>/MCRegisterInfo.h`/ |
| 26 | #include "../../MCDisassembler.h"cxx . . $ `<file>/MCDisassembler.h`/ |
| 27 | #include "../../MathExtras.h"cxx . . $ `<file>/MathExtras.h`/ |
| 28 | |
| 29 | #include "TriCoreDisassembler.h"cxx . . $ `<file>/arch/TriCore/TriCoreDisassembler.h`/ |
| 30 | #include "TriCoreMapping.h"cxx . . $ `<file>/arch/TriCore/TriCoreMapping.h`/ |
| 31 | #include "TriCoreLinkage.h"cxx . . $ `<file>/arch/TriCore/TriCoreLinkage.h`/ |
| 32 | |
| 33 | static unsigned getRegcxx . . $ getReg(cfd3bab38894e84d).(MCRegisterInfocxx . . $ MCRegisterInfo# *MRI, unsigned RC, unsigned RegNo) |
| 34 | { |
| 35 | const MCRegisterClasscxx . . $ MCRegisterClass# *rc = MCRegisterInfo_getRegClasscxx . . $ MCRegisterInfo_getRegClass(43e5681d1534da22).(MRI, RC); |
| 36 | return rc->RegsBegincxx . . $ MCRegisterClass#RegsBegin.[RegNo]; |
| 37 | } |
| 38 | |
| 39 | #define tryDecodeRegcxx . . $ `arch/TriCore/TriCoreDisassembler.c:39:9`!(i, x) \ |
| 40 | status = DecodeRegisterClass(Inst, (x), &desc->OpInfo[(i)], Decoder); \ |
| 41 | if (status != MCDisassembler_Success) \ |
| 42 | return status; |
| 43 | |
| 44 | #define decodeImmcxx . . $ `arch/TriCore/TriCoreDisassembler.c:44:9`!(x) MCOperand_CreateImm0(Inst, (x)); |
| 45 | |
| 46 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSBInstructioncxx . . $ DecodeSBInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 47 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 48 | |
| 49 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSBRInstructioncxx . . $ DecodeSBRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 50 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 51 | |
| 52 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSCInstructioncxx . . $ DecodeSCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 53 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 54 | |
| 55 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSRInstructioncxx . . $ DecodeSRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 56 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 57 | |
| 58 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSRCInstructioncxx . . $ DecodeSRCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 59 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 60 | |
| 61 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSRRInstructioncxx . . $ DecodeSRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 62 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 63 | |
| 64 | static DecodeStatuscxx . . $ DecodeStatus# DecodeABSInstructioncxx . . $ DecodeABSInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 65 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 66 | |
| 67 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBInstructioncxx . . $ DecodeBInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 68 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 69 | |
| 70 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBOInstructioncxx . . $ DecodeBOInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 71 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 72 | |
| 73 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBOLInstructioncxx . . $ DecodeBOLInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 74 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 75 | |
| 76 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCInstructioncxx . . $ DecodeRCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 77 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 78 | |
| 79 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCPWInstructioncxx . . $ DecodeRCPWInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 80 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 81 | |
| 82 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRLCInstructioncxx . . $ DecodeRLCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 83 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 84 | |
| 85 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRInstructioncxx . . $ DecodeRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 86 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 87 | |
| 88 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRR2Instructioncxx . . $ DecodeRR2Instruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 89 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 90 | |
| 91 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRPWInstructioncxx . . $ DecodeRRPWInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 92 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 93 | |
| 94 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSLRInstructioncxx . . $ DecodeSLRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 95 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 96 | |
| 97 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSLROInstructioncxx . . $ DecodeSLROInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 98 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 99 | |
| 100 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSROInstructioncxx . . $ DecodeSROInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 101 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 102 | |
| 103 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSRRSInstructioncxx . . $ DecodeSRRSInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 104 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 105 | |
| 106 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSBCInstructioncxx . . $ DecodeSBCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 107 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 108 | |
| 109 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSBRNInstructioncxx . . $ DecodeSBRNInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 110 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 111 | |
| 112 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSSRInstructioncxx . . $ DecodeSSRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 113 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 114 | |
| 115 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSSROInstructioncxx . . $ DecodeSSROInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 116 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 117 | |
| 118 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSYSInstructioncxx . . $ DecodeSYSInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 119 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 120 | |
| 121 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRR2Instructioncxx . . $ DecodeRRR2Instruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 122 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 123 | |
| 124 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRR1Instructioncxx . . $ DecodeRRR1Instruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 125 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 126 | |
| 127 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBITInstructioncxx . . $ DecodeBITInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 128 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 129 | |
| 130 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRR1Instructioncxx . . $ DecodeRR1Instruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 131 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 132 | |
| 133 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCRInstructioncxx . . $ DecodeRCRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 134 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 135 | |
| 136 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRRWInstructioncxx . . $ DecodeRRRWInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 137 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 138 | |
| 139 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCRRInstructioncxx . . $ DecodeRCRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 140 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 141 | |
| 142 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRRRInstructioncxx . . $ DecodeRRRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 143 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 144 | |
| 145 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBRRInstructioncxx . . $ DecodeBRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 146 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 147 | |
| 148 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBRCInstructioncxx . . $ DecodeBRCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 149 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 150 | |
| 151 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRRInstructioncxx . . $ DecodeRRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 152 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 153 | |
| 154 | static DecodeStatuscxx . . $ DecodeStatus# DecodeABSBInstructioncxx . . $ DecodeABSBInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 155 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 156 | |
| 157 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCRWInstructioncxx . . $ DecodeRCRWInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 158 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 159 | |
| 160 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBRNInstructioncxx . . $ DecodeBRNInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 161 | uint64_tcxx . . $ uint64_t# Address, void *Decoder); |
| 162 | |
| 163 | #define GET_SUBTARGETINFO_ENUMcxx . . $ `arch/TriCore/TriCoreDisassembler.c:163:9`! |
| 164 | |
| 165 | #include "TriCoreGenSubtargetInfo.inc"cxx . . $ `<file>/arch/TriCore/TriCoreGenSubtargetInfo.inc`/ |
| 166 | |
| 167 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! TriCore_getFeatureBitscxx . . $ TriCore_getFeatureBits(8e1b545ea3aecce3).(unsigned int mode, unsigned int feature) |
| 168 | { |
| 169 | switch (mode) { |
| 170 | case CS_MODE_TRICORE_110cxx . . $ CS_MODE_TRICORE_110.: { |
| 171 | return feature == TRICORE_HasV110Opscxx . . $ TRICORE_HasV110Ops.; |
| 172 | } |
| 173 | case CS_MODE_TRICORE_120cxx . . $ CS_MODE_TRICORE_120.: { |
| 174 | return feature == TRICORE_HasV120Opscxx . . $ TRICORE_HasV120Ops.; |
| 175 | } |
| 176 | case CS_MODE_TRICORE_130cxx . . $ CS_MODE_TRICORE_130.: { |
| 177 | return feature == TRICORE_HasV130Opscxx . . $ TRICORE_HasV130Ops.; |
| 178 | } |
| 179 | case CS_MODE_TRICORE_131cxx . . $ CS_MODE_TRICORE_131.: { |
| 180 | return feature == TRICORE_HasV131Opscxx . . $ TRICORE_HasV131Ops.; |
| 181 | } |
| 182 | case CS_MODE_TRICORE_160cxx . . $ CS_MODE_TRICORE_160.: { |
| 183 | return feature == TRICORE_HasV160Opscxx . . $ TRICORE_HasV160Ops.; |
| 184 | } |
| 185 | case CS_MODE_TRICORE_161cxx . . $ CS_MODE_TRICORE_161.: { |
| 186 | return feature == TRICORE_HasV161Opscxx . . $ TRICORE_HasV161Ops.; |
| 187 | } |
| 188 | case CS_MODE_TRICORE_162cxx . . $ CS_MODE_TRICORE_162.: { |
| 189 | return feature == TRICORE_HasV162Opscxx . . $ TRICORE_HasV162Ops.; |
| 190 | } |
| 191 | default: |
| 192 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | #include "TriCoreGenDisassemblerTables.inc"cxx . . $ `<file>/arch/TriCore/TriCoreGenDisassemblerTables.inc`/ |
| 197 | |
| 198 | #define GET_REGINFO_ENUMcxx . . $ `arch/TriCore/TriCoreDisassembler.c:198:9`! |
| 199 | #define GET_REGINFO_MC_DESCcxx . . $ `arch/TriCore/TriCoreDisassembler.c:199:9`! |
| 200 | |
| 201 | #include "TriCoreGenRegisterInfo.inc"cxx . . $ `<file>/arch/TriCore/TriCoreGenRegisterInfo.inc`/ |
| 202 | |
| 203 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(MCInstcxx . . $ MCInst# *Inst, unsigned RegNo, |
| 204 | const MCOperandInfocxx . . $ MCOperandInfo# *MCOI, |
| 205 | void *Decoder) |
| 206 | { |
| 207 | unsigned Reg; |
| 208 | unsigned RegHalfNo = RegNo / 2; |
| 209 | |
| 210 | if (!MCOI || MCOI->OperandTypecxx . . $ MCOperandInfo#OperandType. != MCOI_OPERAND_REGISTERcxx . . $ MCOI_OPERAND_REGISTER.) { |
| 211 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 212 | } |
| 213 | |
| 214 | if (RegHalfNo > 15) |
| 215 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 216 | |
| 217 | if (MCOI->RegClasscxx . . $ MCOperandInfo#RegClass. < 3) { |
| 218 | Reg = getRegcxx . . $ getReg(cfd3bab38894e84d).(Decoder, MCOI->RegClasscxx . . $ MCOperandInfo#RegClass., RegNo); |
| 219 | } else { |
| 220 | Reg = getRegcxx . . $ getReg(cfd3bab38894e84d).(Decoder, MCOI->RegClasscxx . . $ MCOperandInfo#RegClass., RegHalfNo); |
| 221 | } |
| 222 | |
| 223 | MCOperand_CreateReg0cxx . . $ MCOperand_CreateReg0(1d3fdd902ae43da2).(Inst, Reg); |
| 224 | |
| 225 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 226 | } |
| 227 | |
| 228 | #define GET_INSTRINFO_ENUMcxx . . $ `arch/TriCore/TriCoreDisassembler.c:228:9`! |
| 229 | #define GET_INSTRINFO_MC_DESCcxx . . $ `arch/TriCore/TriCoreDisassembler.c:229:9`! |
| 230 | |
| 231 | #include "TriCoreGenInstrInfo.inc"cxx . . $ `<file>/arch/TriCore/TriCoreGenInstrInfo.inc`/ |
| 232 | |
| 233 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSBInstructioncxx . . $ DecodeSBInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 234 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 235 | { |
| 236 | unsigned disp8 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 8); |
| 237 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 238 | |
| 239 | if (is32Bit) // This instruction is 16-bit |
| 240 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 241 | |
| 242 | // Decode disp8. |
| 243 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, disp8); |
| 244 | |
| 245 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 246 | } |
| 247 | |
| 248 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSBRInstructioncxx . . $ DecodeSBRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 249 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 250 | { |
| 251 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 252 | unsigned s2 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 253 | unsigned disp4 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 254 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 255 | |
| 256 | if (is32Bit) // This instruction is 16-bit |
| 257 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 258 | |
| 259 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 260 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 261 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 262 | return status; |
| 263 | |
| 264 | // Decode disp4. |
| 265 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, disp4); |
| 266 | |
| 267 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 268 | } |
| 269 | |
| 270 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSCInstructioncxx . . $ DecodeSCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 271 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 272 | { |
| 273 | unsigned const8 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 8); |
| 274 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 275 | |
| 276 | if (is32Bit) // This instruction is 16-bit |
| 277 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 278 | |
| 279 | // Decode const8. |
| 280 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const8); |
| 281 | |
| 282 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 283 | } |
| 284 | |
| 285 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSRInstructioncxx . . $ DecodeSRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 286 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 287 | { |
| 288 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 289 | unsigned s1_d = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 290 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 291 | |
| 292 | if (is32Bit) // This instruction is 16-bit |
| 293 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 294 | |
| 295 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 296 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 0) { |
| 297 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 298 | Decoder); |
| 299 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 300 | return status; |
| 301 | } |
| 302 | |
| 303 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 1) { |
| 304 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 305 | Decoder); |
| 306 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 307 | return status; |
| 308 | } |
| 309 | |
| 310 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 311 | } |
| 312 | |
| 313 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSRCInstructioncxx . . $ DecodeSRCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 314 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 315 | { |
| 316 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 317 | unsigned const4 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 318 | unsigned s1_d = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 319 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 320 | |
| 321 | if (is32Bit) // This instruction is 16-bit |
| 322 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 323 | |
| 324 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 325 | |
| 326 | // Decode s1/d. |
| 327 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 328 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 329 | return status; |
| 330 | |
| 331 | // Decode const4. |
| 332 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const4); |
| 333 | |
| 334 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 335 | } |
| 336 | |
| 337 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSRRInstructioncxx . . $ DecodeSRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 338 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 339 | { |
| 340 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 341 | unsigned s2 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 342 | unsigned s1_d = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 343 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 344 | |
| 345 | if (is32Bit) // This instruction is 16-bit |
| 346 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 347 | |
| 348 | // Decode s1/d. |
| 349 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 350 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 351 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 352 | return status; |
| 353 | |
| 354 | // Decode s2. |
| 355 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 356 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 357 | return status; |
| 358 | |
| 359 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 360 | } |
| 361 | |
| 362 | static DecodeStatuscxx . . $ DecodeStatus# DecodeABSInstructioncxx . . $ DecodeABSInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 363 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 364 | { |
| 365 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 366 | unsigned off18_0 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 6); |
| 367 | unsigned off18_1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 368 | unsigned off18_2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 22, 4); |
| 369 | unsigned off18_3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 370 | unsigned off18 = (off18_0 << 0) | (off18_1 << 6) | (off18_2 << 10) | |
| 371 | (off18_3 << 14); |
| 372 | |
| 373 | unsigned s1_d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 374 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 375 | |
| 376 | if (!is32Bit) // This instruction is 32-bit |
| 377 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 378 | |
| 379 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 380 | |
| 381 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 1) { |
| 382 | if (desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0].OperandTypecxx . . $ MCOperandInfo#OperandType. == MCOI_OPERAND_REGISTERcxx . . $ MCOI_OPERAND_REGISTER.) { |
| 383 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, |
| 384 | &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 385 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 386 | return status; |
| 387 | |
| 388 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, off18); |
| 389 | } else { |
| 390 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, off18); |
| 391 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, |
| 392 | &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 393 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 394 | return status; |
| 395 | } |
| 396 | } else { |
| 397 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, off18); |
| 398 | } |
| 399 | |
| 400 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 401 | } |
| 402 | |
| 403 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBInstructioncxx . . $ DecodeBInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 404 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 405 | { |
| 406 | unsigned disp24_0 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 16); |
| 407 | unsigned disp24_1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 8); |
| 408 | unsigned disp24 = (disp24_0 << 0) | (disp24_1 << 16); |
| 409 | |
| 410 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 411 | |
| 412 | if (!is32Bit) // This instruction is 32-bit |
| 413 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 414 | |
| 415 | // Decode disp24. |
| 416 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, disp24); |
| 417 | |
| 418 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 419 | } |
| 420 | |
| 421 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBOInstructioncxx . . $ DecodeBOInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 422 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 423 | { |
| 424 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 425 | unsigned off10_0 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 6); |
| 426 | unsigned off10_1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 427 | unsigned off10 = (off10_0 << 0) | (off10_1 << 6); |
| 428 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! is_store = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 429 | |
| 430 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 431 | unsigned s1_d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 432 | |
| 433 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 434 | |
| 435 | if (!is32Bit) // This instruction is 32-bit |
| 436 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 437 | |
| 438 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 439 | |
| 440 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. == 1) { |
| 441 | return DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 442 | } |
| 443 | |
| 444 | switch (MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)) { |
| 445 | case TRICORE_ST_A_bo_rcxx . . $ TRICORE_ST_A_bo_r.: |
| 446 | case TRICORE_ST_A_bo_ccxx . . $ TRICORE_ST_A_bo_c.: |
| 447 | case TRICORE_ST_B_bo_rcxx . . $ TRICORE_ST_B_bo_r.: |
| 448 | case TRICORE_ST_B_bo_ccxx . . $ TRICORE_ST_B_bo_c.: |
| 449 | case TRICORE_ST_D_bo_rcxx . . $ TRICORE_ST_D_bo_r.: |
| 450 | case TRICORE_ST_D_bo_ccxx . . $ TRICORE_ST_D_bo_c.: |
| 451 | case TRICORE_ST_DA_bo_rcxx . . $ TRICORE_ST_DA_bo_r.: |
| 452 | case TRICORE_ST_DA_bo_ccxx . . $ TRICORE_ST_DA_bo_c.: |
| 453 | case TRICORE_ST_H_bo_rcxx . . $ TRICORE_ST_H_bo_r.: |
| 454 | case TRICORE_ST_H_bo_ccxx . . $ TRICORE_ST_H_bo_c.: |
| 455 | case TRICORE_ST_Q_bo_rcxx . . $ TRICORE_ST_Q_bo_r.: |
| 456 | case TRICORE_ST_Q_bo_ccxx . . $ TRICORE_ST_Q_bo_c.: |
| 457 | case TRICORE_ST_W_bo_rcxx . . $ TRICORE_ST_W_bo_r.: |
| 458 | case TRICORE_ST_W_bo_ccxx . . $ TRICORE_ST_W_bo_c.: |
| 459 | case TRICORE_SWAP_W_bo_rcxx . . $ TRICORE_SWAP_W_bo_r.: |
| 460 | case TRICORE_SWAP_W_bo_ccxx . . $ TRICORE_SWAP_W_bo_c.: |
| 461 | case TRICORE_SWAPMSK_W_bo_ccxx . . $ TRICORE_SWAPMSK_W_bo_c.: |
| 462 | case TRICORE_SWAPMSK_W_bo_rcxx . . $ TRICORE_SWAPMSK_W_bo_r.: { |
| 463 | is_store = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 464 | break; |
| 465 | } |
| 466 | } |
| 467 | |
| 468 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. == 2) { |
| 469 | if (desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1].OperandTypecxx . . $ MCOperandInfo#OperandType. == MCOI_OPERAND_REGISTERcxx . . $ MCOI_OPERAND_REGISTER.) { |
| 470 | // we have [reg+r] instruction |
| 471 | if (is_store) { |
| 472 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 473 | Decoder); |
| 474 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 475 | return status; |
| 476 | return DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 477 | Decoder); |
| 478 | } else { |
| 479 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 480 | Decoder); |
| 481 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 482 | return status; |
| 483 | return DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 484 | Decoder); |
| 485 | } |
| 486 | } else { |
| 487 | // we have one of the CACHE instructions without destination reg |
| 488 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 489 | Decoder); |
| 490 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 491 | return status; |
| 492 | |
| 493 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, off10); |
| 494 | } |
| 495 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 496 | } |
| 497 | |
| 498 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 2) { |
| 499 | if (is_store) { |
| 500 | // we have [reg+c] instruction |
| 501 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 502 | Decoder); |
| 503 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 504 | return status; |
| 505 | |
| 506 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 507 | Decoder); |
| 508 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 509 | return status; |
| 510 | } else { |
| 511 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 512 | Decoder); |
| 513 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 514 | return status; |
| 515 | |
| 516 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 517 | Decoder); |
| 518 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 519 | return status; |
| 520 | } |
| 521 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, off10); |
| 522 | } |
| 523 | |
| 524 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 525 | } |
| 526 | |
| 527 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBOLInstructioncxx . . $ DecodeBOLInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 528 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 529 | { |
| 530 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 531 | unsigned off16_0 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 6); |
| 532 | unsigned off16_1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 22, 6); |
| 533 | unsigned off16_2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 534 | unsigned off16 = (off16_0 << 0) | (off16_1 << 10) | (off16_2 << 6); |
| 535 | |
| 536 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 537 | unsigned s1_d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 538 | |
| 539 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 540 | if (!is32Bit) // This instruction is 32-bit |
| 541 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 542 | |
| 543 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 544 | |
| 545 | switch (MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)) { |
| 546 | case TRICORE_LD_A_bolcxx . . $ TRICORE_LD_A_bol.: |
| 547 | case TRICORE_LD_B_bolcxx . . $ TRICORE_LD_B_bol.: |
| 548 | case TRICORE_LD_BU_bolcxx . . $ TRICORE_LD_BU_bol.: |
| 549 | case TRICORE_LD_H_bolcxx . . $ TRICORE_LD_H_bol.: |
| 550 | case TRICORE_LD_HU_bolcxx . . $ TRICORE_LD_HU_bol.: |
| 551 | case TRICORE_LD_W_bolcxx . . $ TRICORE_LD_W_bol.: |
| 552 | case TRICORE_LEA_bolcxx . . $ TRICORE_LEA_bol.: { |
| 553 | // Decode s1_d. |
| 554 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 555 | Decoder); |
| 556 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 557 | return status; |
| 558 | |
| 559 | // Decode s2. |
| 560 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 561 | Decoder); |
| 562 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 563 | return status; |
| 564 | break; |
| 565 | } |
| 566 | case TRICORE_ST_A_bolcxx . . $ TRICORE_ST_A_bol.: |
| 567 | case TRICORE_ST_B_bolcxx . . $ TRICORE_ST_B_bol.: |
| 568 | case TRICORE_ST_H_bolcxx . . $ TRICORE_ST_H_bol.: |
| 569 | case TRICORE_ST_W_bolcxx . . $ TRICORE_ST_W_bol.: { |
| 570 | // Decode s2. |
| 571 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 572 | Decoder); |
| 573 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 574 | return status; |
| 575 | |
| 576 | // Decode s1_d. |
| 577 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 578 | Decoder); |
| 579 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 580 | return status; |
| 581 | break; |
| 582 | } |
| 583 | default: |
| 584 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 585 | } |
| 586 | |
| 587 | // Decode off16. |
| 588 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, off16); |
| 589 | |
| 590 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 591 | } |
| 592 | |
| 593 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCInstructioncxx . . $ DecodeRCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 594 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 595 | { |
| 596 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 597 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 598 | unsigned const9 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 9); |
| 599 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 600 | |
| 601 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 602 | |
| 603 | if (!is32Bit) // This instruction is 32-bit |
| 604 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 605 | |
| 606 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 607 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 1) { |
| 608 | // Decode d. |
| 609 | status = |
| 610 | DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 611 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 612 | return status; |
| 613 | |
| 614 | // Decode s1. |
| 615 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 616 | Decoder); |
| 617 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 618 | return status; |
| 619 | } |
| 620 | |
| 621 | // Decode const9. |
| 622 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const9); |
| 623 | |
| 624 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 625 | } |
| 626 | |
| 627 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCPWInstructioncxx . . $ DecodeRCPWInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 628 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 629 | { |
| 630 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 631 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 632 | unsigned pos = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 23, 5); |
| 633 | unsigned width = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 5); |
| 634 | unsigned const4 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 635 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 636 | |
| 637 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 638 | |
| 639 | if (!is32Bit) // This instruction is 32-bit |
| 640 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 641 | |
| 642 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 643 | // Decode d. |
| 644 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 645 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 646 | return status; |
| 647 | |
| 648 | // Decode s1. |
| 649 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 650 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 651 | return status; |
| 652 | |
| 653 | // Decode const4. |
| 654 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const4); |
| 655 | |
| 656 | // Decode pos. |
| 657 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, pos); |
| 658 | |
| 659 | // Decode width. |
| 660 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, width); |
| 661 | |
| 662 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 663 | } |
| 664 | |
| 665 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRLCInstructioncxx . . $ DecodeRLCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 666 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 667 | { |
| 668 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 669 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 670 | unsigned const16 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 16); |
| 671 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 672 | |
| 673 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 674 | |
| 675 | if (!is32Bit) // This instruction is 32-bit |
| 676 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 677 | |
| 678 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 679 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. == 3) { |
| 680 | status = |
| 681 | DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 682 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 683 | return status; |
| 684 | |
| 685 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 686 | Decoder); |
| 687 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 688 | return status; |
| 689 | |
| 690 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const16); |
| 691 | |
| 692 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 693 | } |
| 694 | |
| 695 | if (desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0].OperandTypecxx . . $ MCOperandInfo#OperandType. == MCOI_OPERAND_REGISTERcxx . . $ MCOI_OPERAND_REGISTER.) { |
| 696 | status = |
| 697 | DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 698 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 699 | return status; |
| 700 | |
| 701 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const16); |
| 702 | } else { |
| 703 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const16); |
| 704 | if (MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst) == TRICORE_MTCR_rlccxx . . $ TRICORE_MTCR_rlc.) { |
| 705 | status = |
| 706 | DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 707 | } else { |
| 708 | status = |
| 709 | DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 710 | } |
| 711 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 712 | return status; |
| 713 | } |
| 714 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 715 | } |
| 716 | |
| 717 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRInstructioncxx . . $ DecodeRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 718 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 719 | { |
| 720 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 721 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 722 | unsigned n = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 2); |
| 723 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 724 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 725 | |
| 726 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 727 | |
| 728 | if (!is32Bit) // This instruction is 32-bit |
| 729 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 730 | |
| 731 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 732 | /// But even if the instruction is in RR format and has only one operand, |
| 733 | /// we cannot be sure whether the operand is s1 or s2 |
| 734 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. == 1) { |
| 735 | if (desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0].OperandTypecxx . . $ MCOperandInfo#OperandType. == MCOI_OPERAND_REGISTERcxx . . $ MCOI_OPERAND_REGISTER.) { |
| 736 | switch (MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)) { |
| 737 | case TRICORE_CALLI_rr_v110cxx . . $ TRICORE_CALLI_rr_v110.: { |
| 738 | return DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).( |
| 739 | Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 740 | } |
| 741 | default: { |
| 742 | return DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).( |
| 743 | Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 744 | } |
| 745 | } |
| 746 | } |
| 747 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 748 | } |
| 749 | |
| 750 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 0) { |
| 751 | // Decode d. |
| 752 | status = |
| 753 | DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 754 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 755 | return status; |
| 756 | } |
| 757 | |
| 758 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 1) { |
| 759 | if (desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0].OperandTypecxx . . $ MCOperandInfo#OperandType. == MCOI_OPERAND_REGISTERcxx . . $ MCOI_OPERAND_REGISTER.) { |
| 760 | switch (MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)) { |
| 761 | case TRICORE_ABSS_rrcxx . . $ TRICORE_ABSS_rr.: |
| 762 | case TRICORE_ABSS_H_rrcxx . . $ TRICORE_ABSS_H_rr.: |
| 763 | case TRICORE_ABS_H_rrcxx . . $ TRICORE_ABS_H_rr.: |
| 764 | case TRICORE_ABS_B_rrcxx . . $ TRICORE_ABS_B_rr.: |
| 765 | case TRICORE_ABS_rrcxx . . $ TRICORE_ABS_rr.: { |
| 766 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 767 | Decoder); |
| 768 | break; |
| 769 | default: |
| 770 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 771 | Decoder); |
| 772 | } |
| 773 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 774 | return status; |
| 775 | } |
| 776 | } |
| 777 | } |
| 778 | |
| 779 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 2) { |
| 780 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], |
| 781 | Decoder); |
| 782 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 783 | return status; |
| 784 | } |
| 785 | |
| 786 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 3) { |
| 787 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, n); |
| 788 | } |
| 789 | |
| 790 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 791 | } |
| 792 | |
| 793 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRR2Instructioncxx . . $ DecodeRR2Instruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 794 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 795 | { |
| 796 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 797 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 798 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 799 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 800 | |
| 801 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 802 | |
| 803 | if (!is32Bit) // This instruction is 32-bit |
| 804 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 805 | |
| 806 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 807 | // Decode d. |
| 808 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 809 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 810 | return status; |
| 811 | |
| 812 | // Decode s1. |
| 813 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 814 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 815 | return status; |
| 816 | |
| 817 | // Decode s2. |
| 818 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 819 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 820 | return status; |
| 821 | |
| 822 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 823 | } |
| 824 | |
| 825 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRPWInstructioncxx . . $ DecodeRRPWInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 826 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 827 | { |
| 828 | DecodeStatuscxx . . $ DecodeStatus# status; |
| 829 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 830 | unsigned pos = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 23, 5); |
| 831 | unsigned width = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 5); |
| 832 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 833 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 834 | |
| 835 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 836 | |
| 837 | if (!is32Bit) // This instruction is 32-bit |
| 838 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 839 | |
| 840 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 841 | tryDecodeRegcxx . . $ `arch/TriCore/TriCoreDisassembler.c:39:9`!(0, d) tryDecodeRegcxx . . $ `arch/TriCore/TriCoreDisassembler.c:39:9`!(1, s1) tryDecodeRegcxx . . $ `arch/TriCore/TriCoreDisassembler.c:39:9`!(2, s2) |
| 842 | decodeImmcxx . . $ `arch/TriCore/TriCoreDisassembler.c:44:9`!(pos) decodeImmcxx . . $ `arch/TriCore/TriCoreDisassembler.c:44:9`!(width) |
| 843 | |
| 844 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 845 | } |
| 846 | |
| 847 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSLRInstructioncxx . . $ DecodeSLRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 848 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 849 | { |
| 850 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 851 | unsigned d = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 852 | unsigned s2 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 853 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 854 | if (is32Bit) // This instruction is 16-bit |
| 855 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 856 | |
| 857 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 858 | // Decode d. |
| 859 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 860 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 861 | return status; |
| 862 | |
| 863 | // Decode s2. |
| 864 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 865 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 866 | return status; |
| 867 | |
| 868 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 869 | } |
| 870 | |
| 871 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSLROInstructioncxx . . $ DecodeSLROInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 872 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 873 | { |
| 874 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 875 | unsigned d = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 876 | unsigned off4 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 877 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 878 | if (is32Bit) // This instruction is 16-bit |
| 879 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 880 | |
| 881 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 882 | // Decode d. |
| 883 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 884 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 885 | return status; |
| 886 | |
| 887 | // Decode off4. |
| 888 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, off4); |
| 889 | |
| 890 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 891 | } |
| 892 | |
| 893 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSROInstructioncxx . . $ DecodeSROInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 894 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 895 | { |
| 896 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 897 | unsigned off4 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 898 | unsigned s2 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 899 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 900 | if (is32Bit) // This instruction is 16-bit |
| 901 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 902 | |
| 903 | // Decode s2. |
| 904 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 905 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 906 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 907 | return status; |
| 908 | |
| 909 | // Decode off4. |
| 910 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, off4); |
| 911 | |
| 912 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 913 | } |
| 914 | |
| 915 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSRRSInstructioncxx . . $ DecodeSRRSInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 916 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 917 | { |
| 918 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 919 | unsigned n = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 6, 2); |
| 920 | unsigned s1_d = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 921 | unsigned s2 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 922 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 923 | if (is32Bit) // This instruction is 16-bit |
| 924 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 925 | |
| 926 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 927 | |
| 928 | // Decode s1_d. |
| 929 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 930 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 931 | return status; |
| 932 | |
| 933 | // Decode s2. |
| 934 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 935 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 936 | return status; |
| 937 | |
| 938 | // Decode n. |
| 939 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, n); |
| 940 | |
| 941 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 942 | } |
| 943 | |
| 944 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSBCInstructioncxx . . $ DecodeSBCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 945 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 946 | { |
| 947 | unsigned disp4 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 948 | unsigned const4 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 949 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 950 | if (is32Bit) // This instruction is 16-bit |
| 951 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 952 | |
| 953 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 954 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. != 2) { |
| 955 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 956 | } |
| 957 | |
| 958 | // Decode disp4. |
| 959 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, disp4); |
| 960 | |
| 961 | // Decode const4. |
| 962 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const4); |
| 963 | |
| 964 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 965 | } |
| 966 | |
| 967 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSBRNInstructioncxx . . $ DecodeSBRNInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 968 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 969 | { |
| 970 | unsigned disp4 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 971 | unsigned n = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 972 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 973 | if (is32Bit) // This instruction is 16-bit |
| 974 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 975 | |
| 976 | // Decode n. |
| 977 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, n); |
| 978 | // Decode disp4. |
| 979 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, disp4); |
| 980 | |
| 981 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 982 | } |
| 983 | |
| 984 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSSRInstructioncxx . . $ DecodeSSRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 985 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 986 | { |
| 987 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 988 | unsigned s1 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 989 | unsigned s2 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 990 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 991 | if (is32Bit) // This instruction is 16-bit |
| 992 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 993 | |
| 994 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 995 | |
| 996 | // Decode s2. |
| 997 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 998 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 999 | return status; |
| 1000 | |
| 1001 | // Decode s1. |
| 1002 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1003 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1004 | return status; |
| 1005 | |
| 1006 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1007 | } |
| 1008 | |
| 1009 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSSROInstructioncxx . . $ DecodeSSROInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1010 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1011 | { |
| 1012 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1013 | unsigned s1 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 8, 4); |
| 1014 | unsigned off4 = fieldFromInstruction_2cxx . . $ fieldFromInstruction_2(a1ea003ffb260c4a).(Insn, 12, 4); |
| 1015 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1016 | if (is32Bit) // This instruction is 16-bit |
| 1017 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1018 | |
| 1019 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1020 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1021 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1022 | return status; |
| 1023 | |
| 1024 | // Decode off4. |
| 1025 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, off4); |
| 1026 | |
| 1027 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1028 | } |
| 1029 | |
| 1030 | /// 32-bit Opcode Format |
| 1031 | |
| 1032 | static DecodeStatuscxx . . $ DecodeStatus# DecodeSYSInstructioncxx . . $ DecodeSYSInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1033 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1034 | { |
| 1035 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1036 | unsigned s1_d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1037 | |
| 1038 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1039 | if (!is32Bit) // This instruction is 32-bit |
| 1040 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1041 | |
| 1042 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1043 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. > 0) { |
| 1044 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1_d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 1045 | Decoder); |
| 1046 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1047 | return status; |
| 1048 | } |
| 1049 | |
| 1050 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1051 | } |
| 1052 | |
| 1053 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRR2Instructioncxx . . $ DecodeRRR2Instruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1054 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1055 | { |
| 1056 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1057 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1058 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1059 | unsigned s3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 24, 4); |
| 1060 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1061 | |
| 1062 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1063 | if (!is32Bit) // This instruction is 32-bit |
| 1064 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1065 | |
| 1066 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1067 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1068 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1069 | return status; |
| 1070 | |
| 1071 | // Decode s1. |
| 1072 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1073 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1074 | return status; |
| 1075 | |
| 1076 | // Decode s2. |
| 1077 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1078 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1079 | return status; |
| 1080 | |
| 1081 | // Decode s3. |
| 1082 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s3, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[3], Decoder); |
| 1083 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1084 | return status; |
| 1085 | |
| 1086 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1087 | } |
| 1088 | |
| 1089 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRR1Instructioncxx . . $ DecodeRRR1Instruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1090 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1091 | { |
| 1092 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1093 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1094 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1095 | unsigned n = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 2); |
| 1096 | unsigned s3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 24, 4); |
| 1097 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1098 | |
| 1099 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1100 | if (!is32Bit) // This instruction is 32-bit |
| 1101 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1102 | |
| 1103 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1104 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1105 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1106 | return status; |
| 1107 | |
| 1108 | // Decode s1. |
| 1109 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1110 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1111 | return status; |
| 1112 | |
| 1113 | // Decode s2. |
| 1114 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1115 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1116 | return status; |
| 1117 | |
| 1118 | // Decode s3. |
| 1119 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s3, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[3], Decoder); |
| 1120 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1121 | return status; |
| 1122 | |
| 1123 | // Decode n. |
| 1124 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, n); |
| 1125 | |
| 1126 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1127 | } |
| 1128 | |
| 1129 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBITInstructioncxx . . $ DecodeBITInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1130 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1131 | { |
| 1132 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1133 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1134 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1135 | unsigned pos1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 5); |
| 1136 | unsigned pos2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 23, 5); |
| 1137 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1138 | |
| 1139 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1140 | if (!is32Bit) // This instruction is 32-bit |
| 1141 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1142 | |
| 1143 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1144 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1145 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1146 | return status; |
| 1147 | |
| 1148 | // Decode s1. |
| 1149 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1150 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1151 | return status; |
| 1152 | |
| 1153 | // Decode s2. |
| 1154 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1155 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1156 | return status; |
| 1157 | |
| 1158 | // Decode pos1. |
| 1159 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, pos1); |
| 1160 | |
| 1161 | // Decode pos2. |
| 1162 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, pos2); |
| 1163 | |
| 1164 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1165 | } |
| 1166 | |
| 1167 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRR1Instructioncxx . . $ DecodeRR1Instruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1168 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1169 | { |
| 1170 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1171 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1172 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1173 | unsigned n = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 2); |
| 1174 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1175 | |
| 1176 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1177 | if (!is32Bit) // This instruction is 32-bit |
| 1178 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1179 | |
| 1180 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1181 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1182 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1183 | return status; |
| 1184 | |
| 1185 | // Decode s1. |
| 1186 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1187 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1188 | return status; |
| 1189 | |
| 1190 | // Decode s2. |
| 1191 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1192 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1193 | return status; |
| 1194 | |
| 1195 | // Decode n. |
| 1196 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, n); |
| 1197 | |
| 1198 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1199 | } |
| 1200 | |
| 1201 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCRInstructioncxx . . $ DecodeRCRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1202 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1203 | { |
| 1204 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1205 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1206 | unsigned const9 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 9); |
| 1207 | unsigned s3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 24, 4); |
| 1208 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1209 | |
| 1210 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1211 | if (!is32Bit) // This instruction is 32-bit |
| 1212 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1213 | |
| 1214 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1215 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1216 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1217 | return status; |
| 1218 | |
| 1219 | // Decode s1. |
| 1220 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1221 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1222 | return status; |
| 1223 | |
| 1224 | // Decode s3. |
| 1225 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s3, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1226 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1227 | return status; |
| 1228 | |
| 1229 | // Decode const9. |
| 1230 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const9); |
| 1231 | |
| 1232 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1233 | } |
| 1234 | |
| 1235 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRRWInstructioncxx . . $ DecodeRRRWInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1236 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1237 | { |
| 1238 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1239 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1240 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1241 | unsigned width = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 5); |
| 1242 | unsigned s3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 24, 4); |
| 1243 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1244 | |
| 1245 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1246 | if (!is32Bit) // This instruction is 32-bit |
| 1247 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1248 | |
| 1249 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1250 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1251 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1252 | return status; |
| 1253 | |
| 1254 | // Decode s1. |
| 1255 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1256 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1257 | return status; |
| 1258 | |
| 1259 | // Decode s2. |
| 1260 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1261 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1262 | return status; |
| 1263 | |
| 1264 | // Decode s3. |
| 1265 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s3, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[3], Decoder); |
| 1266 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1267 | return status; |
| 1268 | |
| 1269 | // Decode width. |
| 1270 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, width); |
| 1271 | |
| 1272 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1273 | } |
| 1274 | |
| 1275 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCRRInstructioncxx . . $ DecodeRCRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1276 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1277 | { |
| 1278 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1279 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1280 | unsigned const4 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1281 | unsigned s3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 24, 4); |
| 1282 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1283 | |
| 1284 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1285 | if (!is32Bit) // This instruction is 32-bit |
| 1286 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1287 | |
| 1288 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1289 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1290 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1291 | return status; |
| 1292 | |
| 1293 | // Decode s1. |
| 1294 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1295 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1296 | return status; |
| 1297 | |
| 1298 | // Decode const4. |
| 1299 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const4); |
| 1300 | |
| 1301 | // Decode s3. |
| 1302 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s3, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[3], Decoder); |
| 1303 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1304 | return status; |
| 1305 | |
| 1306 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1307 | } |
| 1308 | |
| 1309 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRRRInstructioncxx . . $ DecodeRRRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1310 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1311 | { |
| 1312 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1313 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1314 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1315 | unsigned s3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 24, 4); |
| 1316 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1317 | |
| 1318 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1319 | if (!is32Bit) // This instruction is 32-bit |
| 1320 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1321 | |
| 1322 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1323 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1324 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1325 | return status; |
| 1326 | |
| 1327 | // Decode s1. |
| 1328 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1329 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1330 | return status; |
| 1331 | |
| 1332 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. == 3) { |
| 1333 | switch (MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)) { |
| 1334 | case TRICORE_EXTR_rrrrcxx . . $ TRICORE_EXTR_rrrr.: |
| 1335 | case TRICORE_EXTR_U_rrrrcxx . . $ TRICORE_EXTR_U_rrrr.: |
| 1336 | return DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s3, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1337 | default: |
| 1338 | return DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1339 | } |
| 1340 | } |
| 1341 | |
| 1342 | // Decode s2. |
| 1343 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1344 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1345 | return status; |
| 1346 | // Decode s3. |
| 1347 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s3, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[3], Decoder); |
| 1348 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1349 | return status; |
| 1350 | |
| 1351 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1352 | } |
| 1353 | |
| 1354 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBRRInstructioncxx . . $ DecodeBRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1355 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1356 | { |
| 1357 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1358 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1359 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1360 | unsigned disp15 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 15); |
| 1361 | |
| 1362 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1363 | if (!is32Bit) // This instruction is 32-bit |
| 1364 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1365 | |
| 1366 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1367 | if (MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst) == TRICORE_LOOP_brrcxx . . $ TRICORE_LOOP_brr.) { |
| 1368 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 1369 | Decoder); |
| 1370 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1371 | return status; |
| 1372 | |
| 1373 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, disp15); |
| 1374 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1375 | } |
| 1376 | |
| 1377 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. >= 2) { |
| 1378 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], |
| 1379 | Decoder); |
| 1380 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1381 | return status; |
| 1382 | |
| 1383 | if (desc->NumOperandscxx . . $ MCInstrDesc#NumOperands. >= 3) { |
| 1384 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], |
| 1385 | Decoder); |
| 1386 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1387 | return status; |
| 1388 | } |
| 1389 | } |
| 1390 | |
| 1391 | // Decode disp15. |
| 1392 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, disp15); |
| 1393 | |
| 1394 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1395 | } |
| 1396 | |
| 1397 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBRCInstructioncxx . . $ DecodeBRCInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1398 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1399 | { |
| 1400 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1401 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1402 | unsigned const4 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1403 | unsigned disp15 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 15); |
| 1404 | |
| 1405 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1406 | if (!is32Bit) // This instruction is 32-bit |
| 1407 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1408 | |
| 1409 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1410 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1411 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1412 | return status; |
| 1413 | |
| 1414 | // Decode const4. |
| 1415 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, const4); |
| 1416 | |
| 1417 | // Decode disp15. |
| 1418 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, disp15); |
| 1419 | |
| 1420 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1421 | } |
| 1422 | |
| 1423 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRRInstructioncxx . . $ DecodeRRRInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1424 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1425 | { |
| 1426 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1427 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1428 | unsigned s2 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1429 | // unsigned n = fieldFromInstruction_4(Insn, 16, 2); |
| 1430 | unsigned s3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 24, 4); |
| 1431 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1432 | |
| 1433 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1434 | if (!is32Bit) // This instruction is 32-bit |
| 1435 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1436 | |
| 1437 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1438 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, d, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1439 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1440 | return status; |
| 1441 | |
| 1442 | // Decode s1. |
| 1443 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[1], Decoder); |
| 1444 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1445 | return status; |
| 1446 | |
| 1447 | // Decode s2. |
| 1448 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s2, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[2], Decoder); |
| 1449 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1450 | return status; |
| 1451 | |
| 1452 | // Decode s3. |
| 1453 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s3, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[3], Decoder); |
| 1454 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1455 | return status; |
| 1456 | |
| 1457 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1458 | } |
| 1459 | |
| 1460 | static DecodeStatuscxx . . $ DecodeStatus# DecodeABSBInstructioncxx . . $ DecodeABSBInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1461 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1462 | { |
| 1463 | unsigned bpos3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 3); |
| 1464 | unsigned b = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 1); |
| 1465 | |
| 1466 | unsigned off18_0_5 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 6); |
| 1467 | unsigned off18_6_9 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1468 | unsigned off18_10_13 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 22, 4); |
| 1469 | unsigned off18_14_17 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1470 | unsigned off18 = (off18_0_5 << 0) | (off18_6_9 << 6) | |
| 1471 | (off18_10_13 << 10) | (off18_14_17 << 14); |
| 1472 | |
| 1473 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1474 | if (!is32Bit) // This instruction is 32-bit |
| 1475 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1476 | |
| 1477 | decodeImmcxx . . $ `arch/TriCore/TriCoreDisassembler.c:44:9`!(off18) decodeImmcxx . . $ `arch/TriCore/TriCoreDisassembler.c:44:9`!(bpos3) decodeImmcxx . . $ `arch/TriCore/TriCoreDisassembler.c:44:9`!(b) |
| 1478 | |
| 1479 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1480 | } |
| 1481 | |
| 1482 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRCRWInstructioncxx . . $ DecodeRCRWInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1483 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1484 | { |
| 1485 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1486 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1487 | unsigned const4 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1488 | unsigned width = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 5); |
| 1489 | unsigned s3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 24, 4); |
| 1490 | unsigned d = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 28, 4); |
| 1491 | |
| 1492 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1493 | if (!is32Bit) // This instruction is 32-bit |
| 1494 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1495 | |
| 1496 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1497 | tryDecodeRegcxx . . $ `arch/TriCore/TriCoreDisassembler.c:39:9`!(0, d) tryDecodeRegcxx . . $ `arch/TriCore/TriCoreDisassembler.c:39:9`!(1, s1) tryDecodeRegcxx . . $ `arch/TriCore/TriCoreDisassembler.c:39:9`!(2, s3) |
| 1498 | decodeImmcxx . . $ `arch/TriCore/TriCoreDisassembler.c:44:9`!(const4) decodeImmcxx . . $ `arch/TriCore/TriCoreDisassembler.c:44:9`!(width) |
| 1499 | |
| 1500 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1501 | } |
| 1502 | |
| 1503 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBRNInstructioncxx . . $ DecodeBRNInstruction(5cf631094b44bc95).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 1504 | uint64_tcxx . . $ uint64_t# Address, void *Decoder) |
| 1505 | { |
| 1506 | DecodeStatuscxx . . $ DecodeStatus# status = MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1507 | unsigned s1 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 8, 4); |
| 1508 | |
| 1509 | unsigned n_0_3 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 12, 4); |
| 1510 | unsigned n_4 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 7, 1); |
| 1511 | unsigned n = (n_0_3 << 0) | (n_4 << 4); |
| 1512 | |
| 1513 | unsigned disp15 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 15); |
| 1514 | |
| 1515 | unsigned is32Bit = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 1); |
| 1516 | if (!is32Bit) // This instruction is 32-bit |
| 1517 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 1518 | |
| 1519 | const MCInstrDesccxx . . $ MCInstrDesc# *desc = &TriCoreInstscxx . . $ TriCoreInsts.[MCInst_getOpcodecxx . . $ MCInst_getOpcode(66549afbf0596d6c).(Inst)]; |
| 1520 | status = DecodeRegisterClasscxx . . $ DecodeRegisterClass(87e71db03029aca0).(Inst, s1, &desc->OpInfocxx . . $ MCInstrDesc#OpInfo.[0], Decoder); |
| 1521 | if (status != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 1522 | return status; |
| 1523 | |
| 1524 | // Decode n. |
| 1525 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, n); |
| 1526 | |
| 1527 | // Decode disp15. |
| 1528 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, disp15); |
| 1529 | |
| 1530 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 1531 | } |
| 1532 | |
| 1533 | #define GET_SUBTARGETINFO_ENUMcxx . . $ `arch/TriCore/TriCoreDisassembler.c:1533:9`! |
| 1534 | |
| 1535 | #include "TriCoreGenInstrInfo.inc"cxx . . $ `<file>/arch/TriCore/TriCoreGenInstrInfo.inc`/ |
| 1536 | |
| 1537 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! tryGetInstruction16cxx . . $ tryGetInstruction16(771c51e41a4eb0a8).(const uint8_tcxx . . $ uint8_t# *code, size_t code_len, |
| 1538 | MCInstcxx . . $ MCInst# *MI, uint16_tcxx . . $ uint16_t# *size, |
| 1539 | uint64_tcxx . . $ uint64_t# address, void *info, |
| 1540 | const uint8_tcxx . . $ uint8_t# *decoderTable16) |
| 1541 | { |
| 1542 | if (code_len < 2) { |
| 1543 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 1544 | } |
| 1545 | uint16_tcxx . . $ uint16_t# insn16 = readBytes16cxx . . $ readBytes16(c1497bf24a45deb).(MI, code); |
| 1546 | DecodeStatuscxx . . $ DecodeStatus# Result = decodeInstruction_2cxx . . $ decodeInstruction_2(3a3dfcd333b7d205).(decoderTable16, MI, insn16, |
| 1547 | address, info, 0); |
| 1548 | if (Result != MCDisassembler_Failcxx . . $ MCDisassembler_Fail.) { |
| 1549 | *size = 2; |
| 1550 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 1551 | } |
| 1552 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 1553 | } |
| 1554 | |
| 1555 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! tryGetInstruction32cxx . . $ tryGetInstruction32(771c51e41a4eb0a8).(const uint8_tcxx . . $ uint8_t# *code, size_t code_len, |
| 1556 | MCInstcxx . . $ MCInst# *MI, uint16_tcxx . . $ uint16_t# *size, |
| 1557 | uint64_tcxx . . $ uint64_t# address, void *info, |
| 1558 | const uint8_tcxx . . $ uint8_t# *decoderTable32) |
| 1559 | { |
| 1560 | if (code_len < 4) { |
| 1561 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 1562 | } |
| 1563 | uint32_tcxx . . $ uint32_t# insn32 = readBytes32cxx . . $ readBytes32(baba937dc08fe273).(MI, code); |
| 1564 | DecodeStatuscxx . . $ DecodeStatus# Result = decodeInstruction_4cxx . . $ decodeInstruction_4(d8ade10cc4d3a002).(decoderTable32, MI, insn32, |
| 1565 | address, info, 0); |
| 1566 | if (Result != MCDisassembler_Failcxx . . $ MCDisassembler_Fail.) { |
| 1567 | *size = 4; |
| 1568 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 1569 | } |
| 1570 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 1571 | } |
| 1572 | |
| 1573 | static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! getInstructioncxx . . $ getInstruction(fe94ce91eeab61e9).(cshcxx . . $ csh# ud, const uint8_tcxx . . $ uint8_t# *code, size_t code_len, |
| 1574 | MCInstcxx . . $ MCInst# *MI, uint16_tcxx . . $ uint16_t# *size, uint64_tcxx . . $ uint64_t# address, |
| 1575 | void *info) |
| 1576 | { |
| 1577 | if (!ud) { |
| 1578 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 1579 | } |
| 1580 | |
| 1581 | struct cs_structcxx . . $ cs_struct# *cs = (struct cs_structcxx . . $ cs_struct# *)ud; |
| 1582 | if (MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.) { |
| 1583 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail., 0, sizeof(cs_detailcxx . . $ cs_detail#)); |
| 1584 | } |
| 1585 | |
| 1586 | switch (cs->modecxx . . $ cs_struct#mode.) { |
| 1587 | case CS_MODE_TRICORE_110cxx . . $ CS_MODE_TRICORE_110.: { |
| 1588 | if (tryGetInstruction16cxx . . $ tryGetInstruction16(771c51e41a4eb0a8).(code, code_len, MI, size, address, info, |
| 1589 | DecoderTablev11016cxx . . $ DecoderTablev11016.) || |
| 1590 | tryGetInstruction32cxx . . $ tryGetInstruction32(771c51e41a4eb0a8).(code, code_len, MI, size, address, info, |
| 1591 | DecoderTablev11032cxx . . $ DecoderTablev11032.)) { |
| 1592 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 1593 | } |
| 1594 | break; |
| 1595 | } |
| 1596 | case CS_MODE_TRICORE_161cxx . . $ CS_MODE_TRICORE_161.: { |
| 1597 | if (tryGetInstruction32cxx . . $ tryGetInstruction32(771c51e41a4eb0a8).(code, code_len, MI, size, address, info, |
| 1598 | DecoderTablev16132cxx . . $ DecoderTablev16132.)) { |
| 1599 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 1600 | } |
| 1601 | break; |
| 1602 | } |
| 1603 | case CS_MODE_TRICORE_162cxx . . $ CS_MODE_TRICORE_162.: { |
| 1604 | if (tryGetInstruction16cxx . . $ tryGetInstruction16(771c51e41a4eb0a8).(code, code_len, MI, size, address, info, |
| 1605 | DecoderTablev16216cxx . . $ DecoderTablev16216.) || |
| 1606 | tryGetInstruction32cxx . . $ tryGetInstruction32(771c51e41a4eb0a8).(code, code_len, MI, size, address, info, |
| 1607 | DecoderTablev16232cxx . . $ DecoderTablev16232.)) { |
| 1608 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 1609 | } |
| 1610 | break; |
| 1611 | } |
| 1612 | default: |
| 1613 | break; |
| 1614 | } |
| 1615 | |
| 1616 | return tryGetInstruction16cxx . . $ tryGetInstruction16(771c51e41a4eb0a8).(code, code_len, MI, size, address, info, |
| 1617 | DecoderTable16cxx . . $ DecoderTable16.) || |
| 1618 | tryGetInstruction32cxx . . $ tryGetInstruction32(771c51e41a4eb0a8).(code, code_len, MI, size, address, info, |
| 1619 | DecoderTable32cxx . . $ DecoderTable32.); |
| 1620 | } |
| 1621 | |
| 1622 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! TriCore_LLVM_getInstructioncxx . . $ TriCore_LLVM_getInstruction(fe94ce91eeab61e9).(cshcxx . . $ csh# handle, const uint8_tcxx . . $ uint8_t# *Bytes, |
| 1623 | size_t ByteLen, MCInstcxx . . $ MCInst# *MI, uint16_tcxx . . $ uint16_t# *Size, |
| 1624 | uint64_tcxx . . $ uint64_t# Address, void *Info) |
| 1625 | { |
| 1626 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! Result = |
| 1627 | getInstructioncxx . . $ getInstruction(fe94ce91eeab61e9).(handle, Bytes, ByteLen, MI, Size, Address, Info); |
| 1628 | if (Result) { |
| 1629 | TriCore_set_instr_map_datacxx . . $ TriCore_set_instr_map_data(94c8a3269074abe9).(MI); |
| 1630 | } |
| 1631 | return Result; |
| 1632 | } |
| 1633 | |
| 1634 | void TriCore_init_mricxx . . $ TriCore_init_mri(c2e0c34190506c3d).(MCRegisterInfocxx . . $ MCRegisterInfo# *MRI) |
| 1635 | { |
| 1636 | /* |
| 1637 | InitMCRegisterInfo(TriCoreRegDesc, 45, RA, PC, |
| 1638 | TriCoreMCRegisterClasses, 4, |
| 1639 | TriCoreRegUnitRoots, |
| 1640 | 16, |
| 1641 | TriCoreRegDiffLists, |
| 1642 | TriCoreRegStrings, |
| 1643 | TriCoreSubRegIdxLists, |
| 1644 | 1, |
| 1645 | TriCoreSubRegIdxRanges, |
| 1646 | TriCoreRegEncodingTable); |
| 1647 | */ |
| 1648 | |
| 1649 | MCRegisterInfo_InitMCRegisterInfocxx . . $ MCRegisterInfo_InitMCRegisterInfo(5e86a0227010d6ff).( |
| 1650 | MRI, TriCoreRegDesccxx . . $ TriCoreRegDesc., ARR_SIZEcxx . . $ `utils.h:24:9`!(TriCoreRegDesc), 0, 0, |
| 1651 | TriCoreMCRegisterClassescxx . . $ TriCoreMCRegisterClasses., ARR_SIZEcxx . . $ `utils.h:24:9`!(TriCoreMCRegisterClasses), 0, |
| 1652 | 0, TriCoreRegDiffListscxx . . $ TriCoreRegDiffLists., 0, TriCoreSubRegIdxListscxx . . $ TriCoreSubRegIdxLists., 1, 0); |
| 1653 | } |
| 1654 | |
| 1655 | #endif |