13 #ifdef CAPSTONE_HAS_SYSZ
19 #include "../../cs_priv.h"
20 #include "../../utils.h"
24 #include "../../MCInst.h"
25 #include "../../MCInstrDesc.h"
26 #include "../../MCFixedLenDisassembler.h"
27 #include "../../MCRegisterInfo.h"
28 #include "../../MCDisassembler.h"
29 #include "../../MathExtras.h"
51 uint64_t Address,
const void *Decoder)
57 uint64_t Address,
const void *Decoder)
63 uint64_t Address,
const void *Decoder)
69 uint64_t Address,
const void *Decoder)
75 uint64_t Address,
const void *Decoder)
81 uint64_t Address,
const void *Decoder)
87 uint64_t Address,
const void *Decoder)
93 uint64_t Address,
const void *Decoder)
113 uint64_t Address,
const void *Decoder)
115 return decodeUImmOperand(Inst, Imm);
119 uint64_t Address,
const void *Decoder)
121 return decodeUImmOperand(Inst, Imm);
125 uint64_t Address,
const void *Decoder)
127 return decodeUImmOperand(Inst, Imm);
131 uint64_t Address,
const void *Decoder)
133 return decodeUImmOperand(Inst, Imm);
137 uint64_t Address,
const void *Decoder)
139 return decodeUImmOperand(Inst, Imm);
143 uint64_t Address,
const void *Decoder)
145 return decodeUImmOperand(Inst, Imm);
149 uint64_t Address,
const void *Decoder)
151 return decodeSImmOperand(Inst, Imm, 8);
155 uint64_t Address,
const void *Decoder)
157 return decodeSImmOperand(Inst, Imm, 16);
161 uint64_t Address,
const void *Decoder)
163 return decodeSImmOperand(Inst, Imm, 32);
175 uint64_t Address,
const void *Decoder)
177 return decodePCDBLOperand(Inst, Imm, Address, 16);
184 return decodePCDBLOperand(Inst, Imm, Address, 32);
188 const unsigned *Regs)
201 const unsigned *Regs)
213 const unsigned *Regs)
228 const unsigned *Regs)
243 const unsigned *Regs)
258 uint64_t Address,
const void *Decoder)
264 uint64_t Address,
const void *Decoder)
270 uint64_t Address,
const void *Decoder)
276 uint64_t Address,
const void *Decoder)
282 uint64_t Address,
const void *Decoder)
288 uint64_t Address,
const void *Decoder)
294 uint64_t Address,
const void *Decoder)
299 #define GET_SUBTARGETINFO_ENUM
312 Table = DecoderTable16;
313 }
else if (*
code < 0xc0) {
315 Table = DecoderTable32;
318 Table = DecoderTable48;
321 if (code_len < *
size)
332 Inst = (Inst << 8) |
code[
I];
337 #define GET_REGINFO_ENUM
338 #define GET_REGINFO_MC_DESC
357 SystemZMCRegisterClasses, 12,
361 SystemZSubRegIdxLists, 7,
void MCOperand_CreateReg0(MCInst *mcInst, unsigned Reg)
void MCOperand_CreateImm0(MCInst *mcInst, int64_t Val)
void MCRegisterInfo_InitMCRegisterInfo(MCRegisterInfo *RI, const MCRegisterDesc *D, unsigned NR, unsigned RA, unsigned PC, const MCRegisterClass *C, unsigned NC, uint16_t(*RURoots)[2], unsigned NRU, const MCPhysReg *DL, const char *Strings, const uint16_t *SubIndices, unsigned NumIndices, const uint16_t *RET)
void SystemZ_init(MCRegisterInfo *MRI)
bool SystemZ_getInstruction(csh ud, const uint8_t *code, size_t code_len, MCInst *instr, uint16_t *size, uint64_t address, void *info)
const unsigned SystemZMC_GRH32Regs[16]
const unsigned SystemZMC_GR128Regs[16]
const unsigned SystemZMC_FP128Regs[16]
const unsigned SystemZMC_FP64Regs[16]
const unsigned SystemZMC_GR32Regs[16]
const unsigned SystemZMC_FP32Regs[16]
const unsigned SystemZMC_GR64Regs[16]
int decodeInstruction(struct InternalInstruction *insn, byteReader_t reader, const void *readerArg, uint64_t startLoc, DisassemblerMode mode)
RzBinInfo * info(RzBinFile *bf)
#define offsetof(type, member)
return memset(p, 0, total)