mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-27 15:30:33 +00:00
x86: quick fix for RCRm1 instruction - issue #1456
This commit is contained in:
parent
3d50d2cffd
commit
38d181d148
@ -47558,6 +47558,16 @@ static void printInstruction(MCInst *MI, SStream *O)
|
||||
Bits |= (uint64_t)OpInfo2[opcode] << 48;
|
||||
SStream_concat0(O, AsmStrs+(Bits & 16383)-1);
|
||||
|
||||
// TODO: dirty quick hack. fix tablegen instead
|
||||
switch(MCInst_getOpcode(MI)) {
|
||||
default: break;
|
||||
case X86_RCR8m1:
|
||||
case X86_RCR16m1:
|
||||
case X86_RCR32m1:
|
||||
case X86_RCR64m1:
|
||||
SStream_concat0(O, "\t$1, ");
|
||||
break;
|
||||
}
|
||||
|
||||
// Fragment 0 encoded into 7 bits for 103 unique commands.
|
||||
// printf("Fragment 0: %"PRIu64"\n", ((Bits >> 14) & 127));
|
||||
|
@ -729,6 +729,28 @@ void X86_Intel_printInst(MCInst *MI, SStream *O, void *Info)
|
||||
|
||||
if (MI->op1_size == 0 && reg)
|
||||
MI->op1_size = MI->csh->regsize_map[reg];
|
||||
|
||||
// TODO: dirty quick hack. fix tablegen instead
|
||||
// printf("opcode = %u\n", MCInst_getOpcode(MI));
|
||||
switch(MCInst_getOpcode(MI)) {
|
||||
default:
|
||||
break;
|
||||
|
||||
case X86_RCR8m1:
|
||||
case X86_RCR16m1:
|
||||
case X86_RCR32m1:
|
||||
case X86_RCR64m1:
|
||||
SStream_concat0(O, ", 1");
|
||||
|
||||
if (MI->csh->detail) {
|
||||
MI->flat_insn->detail->x86.operands[1].type = X86_OP_IMM;
|
||||
MI->flat_insn->detail->x86.operands[1].imm = 1;
|
||||
MI->flat_insn->detail->x86.operands[1].size = 1;
|
||||
MI->flat_insn->detail->x86.op_count = 2;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// printPCRelImm - This is used to print an immediate value that ends up
|
||||
|
Loading…
Reference in New Issue
Block a user