17 #ifdef CAPSTONE_HAS_XCORE
19 #if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)
20 #pragma warning(disable : 4996) // disable MSVC's warning on strcpy()
21 #pragma warning(disable : 28719) // disable MSVC's warning on strcpy()
30 #include "../../MCInst.h"
31 #include "../../utils.h"
32 #include "../../SStream.h"
33 #include "../../MCRegisterInfo.h"
34 #include "../../MathExtras.h"
37 static const char *getRegisterName(
unsigned RegNo);
76 while(*p2 && *p2 ==
' ')
81 while(*
p && *
p !=
'[')
93 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].mem.disp = 0;
94 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].mem.direct = 1;
100 while(*
p && *
p !=
']')
114 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].mem.disp = atoi(p2);
150 static void set_mem_access(
MCInst *MI,
bool status,
int reg)
157 if (reg != 0xffff && reg != -0xffff) {
165 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].mem.disp = 0;
166 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].mem.direct = 1;
173 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].mem.disp = 0;
175 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].mem.direct = 1;
177 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].mem.direct = -1;
204 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].reg = reg;
215 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].mem.disp = Imm;
218 MI->
flat_insn->detail->xcore.operands[MI->
flat_insn->detail->xcore.op_count].imm = Imm;
227 if (OpNum >= MI->
size)
237 static void printInlineJT32(
MCInst *MI,
int OpNum,
SStream *O)
241 #define PRINT_ALIAS_INSTR
242 #include "XCoreGenAsmWriter.inc"
246 printInstruction(MI, O, Info);
247 set_mem_access(MI,
false, 0);