Merge branch 'master' of https://github.com/gdbinit/capstone into fix

_v3_old
Nguyen Anh Quynh 10 years ago
commit 07532bd620
  1. 2
      arch/AArch64/AArch64Disassembler.c
  2. 3
      arch/ARM/ARMDisassembler.c
  3. 9
      arch/PowerPC/PPCMapping.c

@ -224,7 +224,7 @@ static DecodeStatus _getInstruction(cs_struct *ud, MCInst *MI,
{
uint32_t insn;
DecodeStatus result;
int i;
size_t i;
if (code_len < 4) {
// not enough data

@ -687,7 +687,6 @@ static DecodeStatus _Thumb_getInstruction(cs_struct *ud, MCInst *MI, const uint8
bool InITBlock;
unsigned Firstcond, Mask;
uint32_t NEONLdStInsn, insn32, NEONDataInsn, NEONCryptoInsn, NEONv8Insn;
int i;
// We want to read exactly 2 bytes of data.
if (code_len < 2)
@ -695,7 +694,7 @@ static DecodeStatus _Thumb_getInstruction(cs_struct *ud, MCInst *MI, const uint8
return MCDisassembler_Fail;
ud->ITBlock.size = 0;
size_t i;
if (MI->flat_insn->detail) {
memset(&MI->flat_insn->detail->arm, 0, sizeof(cs_arm));
for (i = 0; i < ARR_SIZE(MI->flat_insn->detail->arm.operands); i++)

@ -8089,8 +8089,7 @@ static struct ppc_alias alias_insn_name_maps[] = {
// given alias mnemonic, return instruction ID & CC
bool PPC_alias_insn(const char *name, struct ppc_alias *alias)
{
int i;
size_t i;
for(i = 0; i < ARR_SIZE(alias_insn_name_maps); i++) {
if (!strcmp(name, alias_insn_name_maps[i].mnem)) {
alias->id = alias_insn_name_maps[i].id;
@ -8100,9 +8099,9 @@ bool PPC_alias_insn(const char *name, struct ppc_alias *alias)
}
// not really an alias insn
i = name2id(&insn_name_maps[1], ARR_SIZE(insn_name_maps) - 1, name);
if (i != -1) {
alias->id = insn_name_maps[i].id;
int x = name2id(&insn_name_maps[1], ARR_SIZE(insn_name_maps) - 1, name);
if (x != -1) {
alias->id = insn_name_maps[x].id;
alias->cc = PPC_BC_INVALID;
return true;
}

Loading…
Cancel
Save