mirror of
https://github.com/capstone-engine/capstone.git
synced 2025-02-10 16:42:54 +00:00
Align thumb BLX immediate by discarding low bits
This commit is contained in:
parent
3722c74f69
commit
8b12b71cf5
@ -841,9 +841,7 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O)
|
||||
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
|
||||
#define _ALIGN_DOWN(v, align_width) ((v/align_width)*align_width)
|
||||
imm = _ALIGN_DOWN(imm, 4);
|
||||
#undef _ALIGN_DOWN
|
||||
imm &= ~3;
|
||||
}
|
||||
} else {
|
||||
imm += (int32_t)MI->address + 8;
|
||||
|
Loading…
x
Reference in New Issue
Block a user