Skip to content

Commit

Permalink
Fix incorrect alignment of labels. (#2277)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 authored Feb 22, 2024
1 parent 34a1e01 commit 215eae8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/AArch64/AArch64InstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,7 @@ void printAdrLabel(MCInst *MI, uint64_t Address, unsigned OpNum, SStream *O)
const int64_t Offset = MCOperand_getImm(Op);
SStream_concat0(O, markup("<imm:"));
if (!MI->csh->PrintBranchImmNotAsAddress)
printUInt64(O, ((Address & -4096) + Offset));
printUInt64(O, ((Address & -4) + Offset));
else {
printUInt64Bang(O, Offset);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/AArch64/AArch64Mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ static void add_cs_detail_general(MCInst *MI, aarch64_op_group op_group,
}
case AArch64_OP_GROUP_AdrLabel: {
int64_t Offset = MCInst_getOpVal(MI, OpNum);
AArch64_set_detail_op_imm(MI, OpNum, AArch64_OP_IMM, (MI->address & -4096) + Offset);
AArch64_set_detail_op_imm(MI, OpNum, AArch64_OP_IMM, (MI->address & -4) + Offset);
break;
}
case AArch64_OP_GROUP_AdrpLabel: {
Expand Down

0 comments on commit 215eae8

Please sign in to comment.