Skip to content

Commit

Permalink
arm: some simple improvements & cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Jul 31, 2014
1 parent 26dfbc6 commit 0c235e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/ARM/ARMInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,7 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O)
}
}
} else if (MCOperand_isImm(Op)) {
unsigned int opc = 0;
opc = MCInst_getOpcode(MI);
unsigned int opc = MCInst_getOpcode(MI);

imm = (int32_t)MCOperand_getImm(Op);

Expand All @@ -606,8 +605,7 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O)
if (MI->csh->mode & CS_MODE_THUMB) {
imm += (int32_t)MI->address + 4;
if (ARM_blx_to_arm_mode(MI->csh, opc)) {
// here need to align down to the nearest 4-byte
// address
// here need to align down to the nearest 4-byte address
#define _ALIGN_DOWN(v, align_width) ((v/align_width)*align_width)
imm = _ALIGN_DOWN(imm, 4);
#undef _ALIGN_DOWN
Expand Down

0 comments on commit 0c235e1

Please sign in to comment.