mips: no need cs_struct.micro_mips, as we can get that from cs_struct.mode

_v3_old
Nguyen Anh Quynh 11 years ago
parent 9d946516c3
commit 2215895ebc
  1. 7
      arch/Mips/MipsDisassembler.c
  2. 3
      cs.c
  3. 1
      cs_priv.h

@ -288,7 +288,7 @@ bool Mips_getInstruction(csh ud, unsigned char *code, size_t code_len, MCInst *i
code, code_len, code, code_len,
size, size,
address, handle->big_endian, (MCRegisterInfo *)info, address, handle->big_endian, (MCRegisterInfo *)info,
handle->micro_mips); handle->mode & CS_MODE_MICRO);
return status == MCDisassembler_Success; return status == MCDisassembler_Success;
} }
@ -371,11 +371,6 @@ static DecodeStatus DecodeGPR32RegisterClass(MCInst *Inst,
static DecodeStatus DecodePtrRegisterClass(MCInst *Inst, static DecodeStatus DecodePtrRegisterClass(MCInst *Inst,
unsigned RegNo, uint64_t Address, MCRegisterInfo *Decoder) unsigned RegNo, uint64_t Address, MCRegisterInfo *Decoder)
{ {
/* TODO: N64 support
if (static_cast<const MipsDisassembler *>(Decoder)->isN64())
return DecodeGPR64RegisterClass(Inst, RegNo, Address, Decoder);
*/
return DecodeGPR32RegisterClass(Inst, RegNo, Address, Decoder); return DecodeGPR32RegisterClass(Inst, RegNo, Address, Decoder);
} }

@ -109,9 +109,6 @@ cs_err cs_open(cs_arch arch, cs_mode mode, csh *handle)
else else
ud->disasm = Mips64_getInstruction; ud->disasm = Mips64_getInstruction;
if (ud->mode & CS_MODE_MICRO)
ud->micro_mips = true;
break; break;
} }
case CS_ARCH_ARM64: { case CS_ARCH_ARM64: {

@ -39,7 +39,6 @@ typedef struct cs_struct {
GetName_t insn_name; GetName_t insn_name;
GetID_t insn_id; GetID_t insn_id;
PostPrinter_t post_printer; PostPrinter_t post_printer;
bool micro_mips; // for Mips only
cs_err errnum; cs_err errnum;
ARM_ITStatus ITBlock; // for Arm only ARM_ITStatus ITBlock; // for Arm only
} cs_struct; } cs_struct;

Loading…
Cancel
Save