| 1 | //===------ XCoreDisassembler.cpp - Disassembler for PowerPC ------*- C++ -*-===//cxx . . $ `<file>/arch/XCore/XCoreDisassembler.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-2015 */ |
| 12 | |
| 13 | #ifdef CAPSTONE_HAS_XCOREcxx . . $ `<built-in>:421: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 "XCoreDisassembler.h"cxx . . $ `<file>/arch/XCore/XCoreDisassembler.h`/ |
| 23 | |
| 24 | #include "../../MCInst.h"cxx . . $ `<file>/MCInst.h`/ |
| 25 | #include "../../MCInstrDesc.h"cxx . . $ `<file>/MCInstrDesc.h`/ |
| 26 | #include "../../MCFixedLenDisassembler.h"cxx . . $ `<file>/MCFixedLenDisassembler.h`/ |
| 27 | #include "../../MCRegisterInfo.h"cxx . . $ `<file>/MCRegisterInfo.h`/ |
| 28 | #include "../../MCDisassembler.h"cxx . . $ `<file>/MCDisassembler.h`/ |
| 29 | #include "../../MathExtras.h"cxx . . $ `<file>/MathExtras.h`/ |
| 30 | |
| 31 | static uint64_tcxx . . $ uint64_t# getFeatureBitscxx . . $ getFeatureBits(c104ebd7d68b2193).(int mode) |
| 32 | { |
| 33 | // support everything |
| 34 | return (uint64_tcxx . . $ uint64_t#)-1; |
| 35 | } |
| 36 | |
| 37 | static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! readInstruction16cxx . . $ readInstruction16(d9633f13d38d3928).(const uint8_tcxx . . $ uint8_t# *code, size_t code_len, uint16_tcxx . . $ uint16_t# *insn) |
| 38 | { |
| 39 | if (code_len < 2) |
| 40 | // insufficient data |
| 41 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 42 | |
| 43 | // Encoded as a little-endian 16-bit word in the stream. |
| 44 | *insn = (code[0] << 0) | (code[1] << 8); |
| 45 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 46 | } |
| 47 | |
| 48 | static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! readInstruction32cxx . . $ readInstruction32(6a3bd5b5b096667d).(const uint8_tcxx . . $ uint8_t# *code, size_t code_len, uint32_tcxx . . $ uint32_t# *insn) |
| 49 | { |
| 50 | if (code_len < 4) |
| 51 | // insufficient data |
| 52 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 53 | |
| 54 | // Encoded as a little-endian 32-bit word in the stream. |
| 55 | *insn = (code[0] << 0) | (code[1] << 8) | (code[2] << 16) | ((uint32_tcxx . . $ uint32_t#) code[3] << 24); |
| 56 | |
| 57 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 58 | } |
| 59 | |
| 60 | static unsigned getRegcxx . . $ getReg(5122505b0a81e722).(const MCRegisterInfocxx . . $ MCRegisterInfo# *MRI, unsigned RC, unsigned RegNo) |
| 61 | { |
| 62 | const MCRegisterClasscxx . . $ MCRegisterClass# *rc = MCRegisterInfo_getRegClasscxx . . $ MCRegisterInfo_getRegClass(43e5681d1534da22).(MRI, RC); |
| 63 | return rc->RegsBegincxx . . $ MCRegisterClass#RegsBegin.[RegNo]; |
| 64 | } |
| 65 | |
| 66 | static DecodeStatuscxx . . $ DecodeStatus# DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned RegNo, |
| 67 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 68 | |
| 69 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRegsRegisterClasscxx . . $ DecodeRRegsRegisterClass(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned RegNo, |
| 70 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 71 | |
| 72 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBitpOperandcxx . . $ DecodeBitpOperand(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Val, |
| 73 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 74 | |
| 75 | static DecodeStatuscxx . . $ DecodeStatus# DecodeNegImmOperandcxx . . $ DecodeNegImmOperand(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Val, |
| 76 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 77 | |
| 78 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RInstructioncxx . . $ Decode2RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 79 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 80 | |
| 81 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RImmInstructioncxx . . $ Decode2RImmInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 82 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 83 | |
| 84 | static DecodeStatuscxx . . $ DecodeStatus# DecodeR2RInstructioncxx . . $ DecodeR2RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 85 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 86 | |
| 87 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RSrcDstInstructioncxx . . $ Decode2RSrcDstInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 88 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 89 | |
| 90 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRUSInstructioncxx . . $ DecodeRUSInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 91 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 92 | |
| 93 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRUSBitpInstructioncxx . . $ DecodeRUSBitpInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 94 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 95 | |
| 96 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRUSSrcDstBitpInstructioncxx . . $ DecodeRUSSrcDstBitpInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 97 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 98 | |
| 99 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL2RInstructioncxx . . $ DecodeL2RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 100 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 101 | |
| 102 | static DecodeStatuscxx . . $ DecodeStatus# DecodeLR2RInstructioncxx . . $ DecodeLR2RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 103 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 104 | |
| 105 | static DecodeStatuscxx . . $ DecodeStatus# Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 106 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 107 | |
| 108 | static DecodeStatuscxx . . $ DecodeStatus# Decode3RImmInstructioncxx . . $ Decode3RImmInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 109 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 110 | |
| 111 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RUSInstructioncxx . . $ Decode2RUSInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 112 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 113 | |
| 114 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RUSBitpInstructioncxx . . $ Decode2RUSBitpInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 115 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 116 | |
| 117 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 118 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 119 | |
| 120 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL3RSrcDstInstructioncxx . . $ DecodeL3RSrcDstInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 121 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 122 | |
| 123 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL2RUSInstructioncxx . . $ DecodeL2RUSInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 124 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 125 | |
| 126 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL2RUSBitpInstructioncxx . . $ DecodeL2RUSBitpInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 127 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 128 | |
| 129 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL6RInstructioncxx . . $ DecodeL6RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 130 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 131 | |
| 132 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL5RInstructioncxx . . $ DecodeL5RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 133 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 134 | |
| 135 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL4RSrcDstInstructioncxx . . $ DecodeL4RSrcDstInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 136 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 137 | |
| 138 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL4RSrcDstSrcDstInstructioncxx . . $ DecodeL4RSrcDstSrcDstInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, |
| 139 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder); |
| 140 | |
| 141 | #include "XCoreGenDisassemblerTables.inc"cxx . . $ `<file>/arch/XCore/XCoreGenDisassemblerTables.inc`/ |
| 142 | |
| 143 | #define GET_REGINFO_ENUMcxx . . $ `arch/XCore/XCoreDisassembler.c:143:9`! |
| 144 | #define GET_REGINFO_MC_DESCcxx . . $ `arch/XCore/XCoreDisassembler.c:144:9`! |
| 145 | #include "XCoreGenRegisterInfo.inc"cxx . . $ `<file>/arch/XCore/XCoreGenRegisterInfo.inc`/ |
| 146 | |
| 147 | static DecodeStatuscxx . . $ DecodeStatus# DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned RegNo, |
| 148 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder) |
| 149 | { |
| 150 | unsigned Reg; |
| 151 | |
| 152 | if (RegNo > 11) |
| 153 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 154 | |
| 155 | Reg = getRegcxx . . $ getReg(5122505b0a81e722).(Decoder, XCore_GRRegsRegClassIDcxx . . $ XCore_GRRegsRegClassID., RegNo); |
| 156 | MCOperand_CreateReg0cxx . . $ MCOperand_CreateReg0(1d3fdd902ae43da2).(Inst, Reg); |
| 157 | |
| 158 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 159 | } |
| 160 | |
| 161 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRRegsRegisterClasscxx . . $ DecodeRRegsRegisterClass(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned RegNo, |
| 162 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder) |
| 163 | { |
| 164 | unsigned Reg; |
| 165 | if (RegNo > 15) |
| 166 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 167 | |
| 168 | Reg = getRegcxx . . $ getReg(5122505b0a81e722).(Decoder, XCore_RRegsRegClassIDcxx . . $ XCore_RRegsRegClassID., RegNo); |
| 169 | MCOperand_CreateReg0cxx . . $ MCOperand_CreateReg0(1d3fdd902ae43da2).(Inst, Reg); |
| 170 | |
| 171 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 172 | } |
| 173 | |
| 174 | static DecodeStatuscxx . . $ DecodeStatus# DecodeBitpOperandcxx . . $ DecodeBitpOperand(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Val, |
| 175 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder) |
| 176 | { |
| 177 | static const unsigned Values[] = { |
| 178 | 32 /*bpw*/, 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32 |
| 179 | }; |
| 180 | |
| 181 | if (Val > 11) |
| 182 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 183 | |
| 184 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, Values[Val]); |
| 185 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 186 | } |
| 187 | |
| 188 | static DecodeStatuscxx . . $ DecodeStatus# DecodeNegImmOperandcxx . . $ DecodeNegImmOperand(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Val, |
| 189 | uint64_tcxx . . $ uint64_t# Address, const void *Decoder) |
| 190 | { |
| 191 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, -(int64_tcxx . . $ int64_t#)Val); |
| 192 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 193 | } |
| 194 | |
| 195 | static DecodeStatuscxx . . $ DecodeStatus# Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(unsigned Insn, unsigned *Op1, unsigned *Op2) |
| 196 | { |
| 197 | unsigned Op1High, Op2High; |
| 198 | unsigned Combined = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 6, 5); |
| 199 | |
| 200 | if (Combined < 27) |
| 201 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 202 | |
| 203 | if (fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 5, 1)) { |
| 204 | if (Combined == 31) |
| 205 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 206 | Combined += 5; |
| 207 | } |
| 208 | |
| 209 | Combined -= 27; |
| 210 | Op1High = Combined % 3; |
| 211 | Op2High = Combined / 3; |
| 212 | *Op1 = (Op1High << 2) | fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 2, 2); |
| 213 | *Op2 = (Op2High << 2) | fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 2); |
| 214 | |
| 215 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 216 | } |
| 217 | |
| 218 | static DecodeStatuscxx . . $ DecodeStatus# Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(unsigned Insn, |
| 219 | unsigned *Op1, unsigned *Op2, unsigned *Op3) |
| 220 | { |
| 221 | unsigned Op1High, Op2High, Op3High; |
| 222 | unsigned Combined = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 6, 5); |
| 223 | if (Combined >= 27) |
| 224 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 225 | |
| 226 | Op1High = Combined % 3; |
| 227 | Op2High = (Combined / 3) % 3; |
| 228 | Op3High = Combined / 9; |
| 229 | *Op1 = (Op1High << 2) | fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 4, 2); |
| 230 | *Op2 = (Op2High << 2) | fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 2, 2); |
| 231 | *Op3 = (Op3High << 2) | fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 2); |
| 232 | |
| 233 | return MCDisassembler_Successcxx . . $ MCDisassembler_Success.; |
| 234 | } |
| 235 | |
| 236 | #define GET_INSTRINFO_ENUMcxx . . $ `arch/XCore/XCoreDisassembler.c:236:9`! |
| 237 | #include "XCoreGenInstrInfo.inc"cxx . . $ `<file>/arch/XCore/XCoreGenInstrInfo.inc`/ |
| 238 | static DecodeStatuscxx . . $ DecodeStatus# Decode2OpInstructionFailcxx . . $ Decode2OpInstructionFail(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 239 | const void *Decoder) |
| 240 | { |
| 241 | // Try and decode as a 3R instruction. |
| 242 | unsigned Opcode = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 11, 5); |
| 243 | switch (Opcode) { |
| 244 | case 0x0: |
| 245 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_STW_2ruscxx . . $ XCore_STW_2rus.); |
| 246 | return Decode2RUSInstructioncxx . . $ Decode2RUSInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 247 | case 0x1: |
| 248 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LDW_2ruscxx . . $ XCore_LDW_2rus.); |
| 249 | return Decode2RUSInstructioncxx . . $ Decode2RUSInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 250 | case 0x2: |
| 251 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_ADD_3rcxx . . $ XCore_ADD_3r.); |
| 252 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 253 | case 0x3: |
| 254 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_SUB_3rcxx . . $ XCore_SUB_3r.); |
| 255 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 256 | case 0x4: |
| 257 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_SHL_3rcxx . . $ XCore_SHL_3r.); |
| 258 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 259 | case 0x5: |
| 260 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_SHR_3rcxx . . $ XCore_SHR_3r.); |
| 261 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 262 | case 0x6: |
| 263 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_EQ_3rcxx . . $ XCore_EQ_3r.); |
| 264 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 265 | case 0x7: |
| 266 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_AND_3rcxx . . $ XCore_AND_3r.); |
| 267 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 268 | case 0x8: |
| 269 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_OR_3rcxx . . $ XCore_OR_3r.); |
| 270 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 271 | case 0x9: |
| 272 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LDW_3rcxx . . $ XCore_LDW_3r.); |
| 273 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 274 | case 0x10: |
| 275 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LD16S_3rcxx . . $ XCore_LD16S_3r.); |
| 276 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 277 | case 0x11: |
| 278 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LD8U_3rcxx . . $ XCore_LD8U_3r.); |
| 279 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 280 | case 0x12: |
| 281 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_ADD_2ruscxx . . $ XCore_ADD_2rus.); |
| 282 | return Decode2RUSInstructioncxx . . $ Decode2RUSInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 283 | case 0x13: |
| 284 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_SUB_2ruscxx . . $ XCore_SUB_2rus.); |
| 285 | return Decode2RUSInstructioncxx . . $ Decode2RUSInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 286 | case 0x14: |
| 287 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_SHL_2ruscxx . . $ XCore_SHL_2rus.); |
| 288 | return Decode2RUSBitpInstructioncxx . . $ Decode2RUSBitpInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 289 | case 0x15: |
| 290 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_SHR_2ruscxx . . $ XCore_SHR_2rus.); |
| 291 | return Decode2RUSBitpInstructioncxx . . $ Decode2RUSBitpInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 292 | case 0x16: |
| 293 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_EQ_2ruscxx . . $ XCore_EQ_2rus.); |
| 294 | return Decode2RUSInstructioncxx . . $ Decode2RUSInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 295 | case 0x17: |
| 296 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_TSETR_3rcxx . . $ XCore_TSETR_3r.); |
| 297 | return Decode3RImmInstructioncxx . . $ Decode3RImmInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 298 | case 0x18: |
| 299 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LSS_3rcxx . . $ XCore_LSS_3r.); |
| 300 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 301 | case 0x19: |
| 302 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LSU_3rcxx . . $ XCore_LSU_3r.); |
| 303 | return Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 304 | } |
| 305 | |
| 306 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 307 | } |
| 308 | |
| 309 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RInstructioncxx . . $ Decode2RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 310 | const void *Decoder) |
| 311 | { |
| 312 | unsigned Op1, Op2; |
| 313 | DecodeStatuscxx . . $ DecodeStatus# S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(Insn, &Op1, &Op2); |
| 314 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 315 | return Decode2OpInstructionFailcxx . . $ Decode2OpInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 316 | |
| 317 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 318 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 319 | |
| 320 | return S; |
| 321 | } |
| 322 | |
| 323 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RImmInstructioncxx . . $ Decode2RImmInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 324 | const void *Decoder) |
| 325 | { |
| 326 | unsigned Op1, Op2; |
| 327 | DecodeStatuscxx . . $ DecodeStatus# S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(Insn, &Op1, &Op2); |
| 328 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 329 | return Decode2OpInstructionFailcxx . . $ Decode2OpInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 330 | |
| 331 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, Op1); |
| 332 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 333 | |
| 334 | return S; |
| 335 | } |
| 336 | |
| 337 | static DecodeStatuscxx . . $ DecodeStatus# DecodeR2RInstructioncxx . . $ DecodeR2RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 338 | const void *Decoder) |
| 339 | { |
| 340 | unsigned Op1, Op2; |
| 341 | DecodeStatuscxx . . $ DecodeStatus# S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(Insn, &Op2, &Op1); |
| 342 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 343 | return Decode2OpInstructionFailcxx . . $ Decode2OpInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 344 | |
| 345 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 346 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 347 | |
| 348 | return S; |
| 349 | } |
| 350 | |
| 351 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RSrcDstInstructioncxx . . $ Decode2RSrcDstInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 352 | const void *Decoder) |
| 353 | { |
| 354 | unsigned Op1, Op2; |
| 355 | DecodeStatuscxx . . $ DecodeStatus# S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(Insn, &Op1, &Op2); |
| 356 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 357 | return Decode2OpInstructionFailcxx . . $ Decode2OpInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 358 | |
| 359 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 360 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 361 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 362 | |
| 363 | return S; |
| 364 | } |
| 365 | |
| 366 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRUSInstructioncxx . . $ DecodeRUSInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 367 | const void *Decoder) |
| 368 | { |
| 369 | unsigned Op1, Op2; |
| 370 | DecodeStatuscxx . . $ DecodeStatus# S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(Insn, &Op1, &Op2); |
| 371 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 372 | return Decode2OpInstructionFailcxx . . $ Decode2OpInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 373 | |
| 374 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 375 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, Op2); |
| 376 | |
| 377 | return S; |
| 378 | } |
| 379 | |
| 380 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRUSBitpInstructioncxx . . $ DecodeRUSBitpInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 381 | const void *Decoder) |
| 382 | { |
| 383 | unsigned Op1, Op2; |
| 384 | DecodeStatuscxx . . $ DecodeStatus# S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(Insn, &Op1, &Op2); |
| 385 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 386 | return Decode2OpInstructionFailcxx . . $ Decode2OpInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 387 | |
| 388 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 389 | DecodeBitpOperandcxx . . $ DecodeBitpOperand(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 390 | |
| 391 | return S; |
| 392 | } |
| 393 | |
| 394 | static DecodeStatuscxx . . $ DecodeStatus# DecodeRUSSrcDstBitpInstructioncxx . . $ DecodeRUSSrcDstBitpInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 395 | const void *Decoder) |
| 396 | { |
| 397 | unsigned Op1, Op2; |
| 398 | DecodeStatuscxx . . $ DecodeStatus# S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(Insn, &Op1, &Op2); |
| 399 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 400 | return Decode2OpInstructionFailcxx . . $ Decode2OpInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 401 | |
| 402 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 403 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 404 | DecodeBitpOperandcxx . . $ DecodeBitpOperand(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 405 | |
| 406 | return S; |
| 407 | } |
| 408 | |
| 409 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL2OpInstructionFailcxx . . $ DecodeL2OpInstructionFail(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 410 | const void *Decoder) |
| 411 | { |
| 412 | // Try and decode as a L3R / L2RUS instruction. |
| 413 | unsigned Opcode = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 4) | |
| 414 | fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 27, 5) << 4; |
| 415 | switch (Opcode) { |
| 416 | case 0x0c: |
| 417 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_STW_l3rcxx . . $ XCore_STW_l3r.); |
| 418 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 419 | case 0x1c: |
| 420 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_XOR_l3rcxx . . $ XCore_XOR_l3r.); |
| 421 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 422 | case 0x2c: |
| 423 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_ASHR_l3rcxx . . $ XCore_ASHR_l3r.); |
| 424 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 425 | case 0x3c: |
| 426 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LDAWF_l3rcxx . . $ XCore_LDAWF_l3r.); |
| 427 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 428 | case 0x4c: |
| 429 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LDAWB_l3rcxx . . $ XCore_LDAWB_l3r.); |
| 430 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 431 | case 0x5c: |
| 432 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LDA16F_l3rcxx . . $ XCore_LDA16F_l3r.); |
| 433 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 434 | case 0x6c: |
| 435 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LDA16B_l3rcxx . . $ XCore_LDA16B_l3r.); |
| 436 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 437 | case 0x7c: |
| 438 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_MUL_l3rcxx . . $ XCore_MUL_l3r.); |
| 439 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 440 | case 0x8c: |
| 441 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_DIVS_l3rcxx . . $ XCore_DIVS_l3r.); |
| 442 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 443 | case 0x9c: |
| 444 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_DIVU_l3rcxx . . $ XCore_DIVU_l3r.); |
| 445 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 446 | case 0x10c: |
| 447 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_ST16_l3rcxx . . $ XCore_ST16_l3r.); |
| 448 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 449 | case 0x11c: |
| 450 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_ST8_l3rcxx . . $ XCore_ST8_l3r.); |
| 451 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 452 | case 0x12c: |
| 453 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_ASHR_l2ruscxx . . $ XCore_ASHR_l2rus.); |
| 454 | return DecodeL2RUSBitpInstructioncxx . . $ DecodeL2RUSBitpInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 455 | case 0x12d: |
| 456 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_OUTPW_l2ruscxx . . $ XCore_OUTPW_l2rus.); |
| 457 | return DecodeL2RUSBitpInstructioncxx . . $ DecodeL2RUSBitpInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 458 | case 0x12e: |
| 459 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_INPW_l2ruscxx . . $ XCore_INPW_l2rus.); |
| 460 | return DecodeL2RUSBitpInstructioncxx . . $ DecodeL2RUSBitpInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 461 | case 0x13c: |
| 462 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LDAWF_l2ruscxx . . $ XCore_LDAWF_l2rus.); |
| 463 | return DecodeL2RUSInstructioncxx . . $ DecodeL2RUSInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 464 | case 0x14c: |
| 465 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LDAWB_l2ruscxx . . $ XCore_LDAWB_l2rus.); |
| 466 | return DecodeL2RUSInstructioncxx . . $ DecodeL2RUSInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 467 | case 0x15c: |
| 468 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_CRC_l3rcxx . . $ XCore_CRC_l3r.); |
| 469 | return DecodeL3RSrcDstInstructioncxx . . $ DecodeL3RSrcDstInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 470 | case 0x18c: |
| 471 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_REMS_l3rcxx . . $ XCore_REMS_l3r.); |
| 472 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 473 | case 0x19c: |
| 474 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_REMU_l3rcxx . . $ XCore_REMU_l3r.); |
| 475 | return DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 476 | } |
| 477 | |
| 478 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 479 | } |
| 480 | |
| 481 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL2RInstructioncxx . . $ DecodeL2RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 482 | const void *Decoder) |
| 483 | { |
| 484 | unsigned Op1, Op2; |
| 485 | DecodeStatuscxx . . $ DecodeStatus# S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2); |
| 486 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 487 | return DecodeL2OpInstructionFailcxx . . $ DecodeL2OpInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 488 | |
| 489 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 490 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 491 | |
| 492 | return S; |
| 493 | } |
| 494 | |
| 495 | static DecodeStatuscxx . . $ DecodeStatus# DecodeLR2RInstructioncxx . . $ DecodeLR2RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 496 | const void *Decoder) |
| 497 | { |
| 498 | unsigned Op1, Op2; |
| 499 | DecodeStatuscxx . . $ DecodeStatus# S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2); |
| 500 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 501 | return DecodeL2OpInstructionFailcxx . . $ DecodeL2OpInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 502 | |
| 503 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 504 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 505 | |
| 506 | return S; |
| 507 | } |
| 508 | |
| 509 | static DecodeStatuscxx . . $ DecodeStatus# Decode3RInstructioncxx . . $ Decode3RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 510 | const void *Decoder) |
| 511 | { |
| 512 | unsigned Op1, Op2, Op3; |
| 513 | DecodeStatuscxx . . $ DecodeStatus# S = Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(Insn, &Op1, &Op2, &Op3); |
| 514 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 515 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 516 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 517 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 518 | } |
| 519 | |
| 520 | return S; |
| 521 | } |
| 522 | |
| 523 | static DecodeStatuscxx . . $ DecodeStatus# Decode3RImmInstructioncxx . . $ Decode3RImmInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 524 | const void *Decoder) |
| 525 | { |
| 526 | unsigned Op1, Op2, Op3; |
| 527 | DecodeStatuscxx . . $ DecodeStatus# S = Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(Insn, &Op1, &Op2, &Op3); |
| 528 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 529 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, Op1); |
| 530 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 531 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 532 | } |
| 533 | |
| 534 | return S; |
| 535 | } |
| 536 | |
| 537 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RUSInstructioncxx . . $ Decode2RUSInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 538 | const void *Decoder) |
| 539 | { |
| 540 | unsigned Op1, Op2, Op3; |
| 541 | DecodeStatuscxx . . $ DecodeStatus# S = Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(Insn, &Op1, &Op2, &Op3); |
| 542 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 543 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 544 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 545 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, Op3); |
| 546 | } |
| 547 | |
| 548 | return S; |
| 549 | } |
| 550 | |
| 551 | static DecodeStatuscxx . . $ DecodeStatus# Decode2RUSBitpInstructioncxx . . $ Decode2RUSBitpInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 552 | const void *Decoder) |
| 553 | { |
| 554 | unsigned Op1, Op2, Op3; |
| 555 | DecodeStatuscxx . . $ DecodeStatus# S = Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(Insn, &Op1, &Op2, &Op3); |
| 556 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 557 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 558 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 559 | DecodeBitpOperandcxx . . $ DecodeBitpOperand(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 560 | } |
| 561 | |
| 562 | return S; |
| 563 | } |
| 564 | |
| 565 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL3RInstructioncxx . . $ DecodeL3RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 566 | const void *Decoder) |
| 567 | { |
| 568 | unsigned Op1, Op2, Op3; |
| 569 | DecodeStatuscxx . . $ DecodeStatus# S = |
| 570 | Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2, &Op3); |
| 571 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 572 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 573 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 574 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 575 | } |
| 576 | |
| 577 | return S; |
| 578 | } |
| 579 | |
| 580 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL3RSrcDstInstructioncxx . . $ DecodeL3RSrcDstInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 581 | const void *Decoder) |
| 582 | { |
| 583 | unsigned Op1, Op2, Op3; |
| 584 | DecodeStatuscxx . . $ DecodeStatus# S = |
| 585 | Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2, &Op3); |
| 586 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 587 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 588 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 589 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 590 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 591 | } |
| 592 | |
| 593 | return S; |
| 594 | } |
| 595 | |
| 596 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL2RUSInstructioncxx . . $ DecodeL2RUSInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 597 | const void *Decoder) |
| 598 | { |
| 599 | unsigned Op1, Op2, Op3; |
| 600 | DecodeStatuscxx . . $ DecodeStatus# S = |
| 601 | Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2, &Op3); |
| 602 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 603 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 604 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 605 | MCOperand_CreateImm0cxx . . $ MCOperand_CreateImm0(c25c894236a70359).(Inst, Op3); |
| 606 | } |
| 607 | |
| 608 | return S; |
| 609 | } |
| 610 | |
| 611 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL2RUSBitpInstructioncxx . . $ DecodeL2RUSBitpInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 612 | const void *Decoder) |
| 613 | { |
| 614 | unsigned Op1, Op2, Op3; |
| 615 | DecodeStatuscxx . . $ DecodeStatus# S = |
| 616 | Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2, &Op3); |
| 617 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 618 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 619 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 620 | DecodeBitpOperandcxx . . $ DecodeBitpOperand(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 621 | } |
| 622 | |
| 623 | return S; |
| 624 | } |
| 625 | |
| 626 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL6RInstructioncxx . . $ DecodeL6RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 627 | const void *Decoder) |
| 628 | { |
| 629 | unsigned Op1, Op2, Op3, Op4, Op5, Op6; |
| 630 | DecodeStatuscxx . . $ DecodeStatus# S = |
| 631 | Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2, &Op3); |
| 632 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 633 | return S; |
| 634 | |
| 635 | S = Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 16), &Op4, &Op5, &Op6); |
| 636 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 637 | return S; |
| 638 | |
| 639 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 640 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op4, Address, Decoder); |
| 641 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 642 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 643 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op5, Address, Decoder); |
| 644 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op6, Address, Decoder); |
| 645 | return S; |
| 646 | } |
| 647 | |
| 648 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL5RInstructionFailcxx . . $ DecodeL5RInstructionFail(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 649 | const void *Decoder) |
| 650 | { |
| 651 | unsigned Opcode; |
| 652 | |
| 653 | // Try and decode as a L6R instruction. |
| 654 | MCInst_clearcxx . . $ MCInst_clear(94c8a3269074abe9).(Inst); |
| 655 | Opcode = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 27, 5); |
| 656 | switch (Opcode) { |
| 657 | default: |
| 658 | break; |
| 659 | case 0x00: |
| 660 | MCInst_setOpcodecxx . . $ MCInst_setOpcode(1d3fdd902ae43da2).(Inst, XCore_LMUL_l6rcxx . . $ XCore_LMUL_l6r.); |
| 661 | return DecodeL6RInstructioncxx . . $ DecodeL6RInstruction(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 662 | } |
| 663 | |
| 664 | return MCDisassembler_Failcxx . . $ MCDisassembler_Fail.; |
| 665 | } |
| 666 | |
| 667 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL5RInstructioncxx . . $ DecodeL5RInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 668 | const void *Decoder) |
| 669 | { |
| 670 | unsigned Op1, Op2, Op3, Op4, Op5; |
| 671 | DecodeStatuscxx . . $ DecodeStatus# S = |
| 672 | Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2, &Op3); |
| 673 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 674 | return DecodeL5RInstructionFailcxx . . $ DecodeL5RInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 675 | |
| 676 | S = Decode2OpInstructioncxx . . $ Decode2OpInstruction(c2900c5ea0771d52).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 16), &Op4, &Op5); |
| 677 | if (S != MCDisassembler_Successcxx . . $ MCDisassembler_Success.) |
| 678 | return DecodeL5RInstructionFailcxx . . $ DecodeL5RInstructionFail(cbc3db6d502b7505).(Inst, Insn, Address, Decoder); |
| 679 | |
| 680 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 681 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op4, Address, Decoder); |
| 682 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 683 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 684 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op5, Address, Decoder); |
| 685 | return S; |
| 686 | } |
| 687 | |
| 688 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL4RSrcDstInstructioncxx . . $ DecodeL4RSrcDstInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 689 | const void *Decoder) |
| 690 | { |
| 691 | unsigned Op1, Op2, Op3; |
| 692 | unsigned Op4 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 4); |
| 693 | DecodeStatuscxx . . $ DecodeStatus# S = |
| 694 | Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2, &Op3); |
| 695 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 696 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 697 | S = DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op4, Address, Decoder); |
| 698 | } |
| 699 | |
| 700 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 701 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op4, Address, Decoder); |
| 702 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 703 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 704 | } |
| 705 | return S; |
| 706 | } |
| 707 | |
| 708 | static DecodeStatuscxx . . $ DecodeStatus# DecodeL4RSrcDstSrcDstInstructioncxx . . $ DecodeL4RSrcDstSrcDstInstruction(cbc3db6d502b7505).(MCInstcxx . . $ MCInst# *Inst, unsigned Insn, uint64_tcxx . . $ uint64_t# Address, |
| 709 | const void *Decoder) |
| 710 | { |
| 711 | unsigned Op1, Op2, Op3; |
| 712 | unsigned Op4 = fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 16, 4); |
| 713 | DecodeStatuscxx . . $ DecodeStatus# S = |
| 714 | Decode3OpInstructioncxx . . $ Decode3OpInstruction(c31deee3f4424e70).(fieldFromInstruction_4cxx . . $ fieldFromInstruction_4(4eebda9b5e4ecc9c).(Insn, 0, 16), &Op1, &Op2, &Op3); |
| 715 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 716 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 717 | S = DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op4, Address, Decoder); |
| 718 | } |
| 719 | |
| 720 | if (S == MCDisassembler_Successcxx . . $ MCDisassembler_Success.) { |
| 721 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op1, Address, Decoder); |
| 722 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op4, Address, Decoder); |
| 723 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op2, Address, Decoder); |
| 724 | DecodeGRRegsRegisterClasscxx . . $ DecodeGRRegsRegisterClass(cbc3db6d502b7505).(Inst, Op3, Address, Decoder); |
| 725 | } |
| 726 | |
| 727 | return S; |
| 728 | } |
| 729 | |
| 730 | #define GET_SUBTARGETINFO_ENUMcxx . . $ `arch/XCore/XCoreDisassembler.c:730:9`! |
| 731 | #include "XCoreGenInstrInfo.inc"cxx . . $ `<file>/arch/XCore/XCoreGenInstrInfo.inc`/ |
| 732 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! XCore_getInstructioncxx . . $ XCore_getInstruction(fe94ce91eeab61e9).(cshcxx . . $ csh# ud, const uint8_tcxx . . $ uint8_t# *code, size_t code_len, MCInstcxx . . $ MCInst# *MI, |
| 733 | uint16_tcxx . . $ uint16_t# *size, uint64_tcxx . . $ uint64_t# address, void *info) |
| 734 | { |
| 735 | uint16_tcxx . . $ uint16_t# insn16; |
| 736 | uint32_tcxx . . $ uint32_t# insn32; |
| 737 | DecodeStatuscxx . . $ DecodeStatus# Result; |
| 738 | |
| 739 | if (!readInstruction16cxx . . $ readInstruction16(d9633f13d38d3928).(code, code_len, &insn16)) { |
| 740 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 741 | } |
| 742 | |
| 743 | if (MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.) { |
| 744 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail., 0, offsetofcxx . . $ `<external>/16391990256953433862/stddef.h:431:9`!(cs_detail, xcore)+sizeof(cs_xcorecxx . . $ cs_xcore#)); |
| 745 | } |
| 746 | |
| 747 | // Calling the auto-generated decoder function. |
| 748 | Result = decodeInstruction_2cxx . . $ decodeInstruction_2(3eb2f4fe0a6cec48).(DecoderTable16cxx . . $ DecoderTable16., MI, insn16, address, info, 0); |
| 749 | if (Result != MCDisassembler_Failcxx . . $ MCDisassembler_Fail.) { |
| 750 | *size = 2; |
| 751 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 752 | } |
| 753 | |
| 754 | if (!readInstruction32cxx . . $ readInstruction32(6a3bd5b5b096667d).(code, code_len, &insn32)) { |
| 755 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 756 | } |
| 757 | |
| 758 | // Calling the auto-generated decoder function. |
| 759 | Result = decodeInstruction_4cxx . . $ decodeInstruction_4(234353cd2c6bdd57).(DecoderTable32cxx . . $ DecoderTable32., MI, insn32, address, info, 0); |
| 760 | if (Result != MCDisassembler_Failcxx . . $ MCDisassembler_Fail.) { |
| 761 | *size = 4; |
| 762 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 763 | } |
| 764 | |
| 765 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 766 | } |
| 767 | |
| 768 | void XCore_initcxx . . $ XCore_init(c2e0c34190506c3d).(MCRegisterInfocxx . . $ MCRegisterInfo# *MRI) |
| 769 | { |
| 770 | /* |
| 771 | InitMCRegisterInfo(XCoreRegDesc, 17, RA, PC, |
| 772 | XCoreMCRegisterClasses, 2, |
| 773 | XCoreRegUnitRoots, |
| 774 | 16, |
| 775 | XCoreRegDiffLists, |
| 776 | XCoreRegStrings, |
| 777 | XCoreSubRegIdxLists, |
| 778 | 1, |
| 779 | XCoreSubRegIdxRanges, |
| 780 | XCoreRegEncodingTable); |
| 781 | */ |
| 782 | |
| 783 | |
| 784 | MCRegisterInfo_InitMCRegisterInfocxx . . $ MCRegisterInfo_InitMCRegisterInfo(5e86a0227010d6ff).(MRI, XCoreRegDesccxx . . $ XCoreRegDesc., 17, |
| 785 | 0, 0, |
| 786 | XCoreMCRegisterClassescxx . . $ XCoreMCRegisterClasses., 2, |
| 787 | 0, 0, |
| 788 | XCoreRegDiffListscxx . . $ XCoreRegDiffLists., |
| 789 | 0, |
| 790 | XCoreSubRegIdxListscxx . . $ XCoreSubRegIdxLists., 1, |
| 791 | 0); |
| 792 | } |
| 793 | |
| 794 | #endif |