mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
AArch64: print correct annotation for ADRP addresses.
The immediate on an ADRP MCInst needs to be multiplied by 0x1000 to obtain the actual PC-offset that will be calculated. llvm-svn: 333525
This commit is contained in:
parent
df7e091147
commit
a00817e988
@ -99,8 +99,8 @@ bool AArch64ExternalSymbolizer::tryAddingSymbolicOperand(
|
||||
EncodedInst |= MCRI.getEncodingValue(MI.getOperand(0).getReg()); // reg
|
||||
SymbolLookUp(DisInfo, EncodedInst, &ReferenceType, Address,
|
||||
&ReferenceName);
|
||||
CommentStream << format("0x%llx",
|
||||
0xfffffffffffff000LL & (Address + Value));
|
||||
CommentStream << format("0x%llx", (0xfffffffffffff000LL & Address) +
|
||||
Value * 0x1000);
|
||||
} else if (MI.getOpcode() == AArch64::ADDXri ||
|
||||
MI.getOpcode() == AArch64::LDRXui ||
|
||||
MI.getOpcode() == AArch64::LDRXl ||
|
||||
|
9
test/MC/AArch64/adrp-annotation.s
Normal file
9
test/MC/AArch64/adrp-annotation.s
Normal file
@ -0,0 +1,9 @@
|
||||
; RUN: llvm-mc -triple aarch64-apple-ios %s -filetype=obj -o %t.o
|
||||
; RUN: llvm-objdump -macho -d %t.o | FileCheck %s
|
||||
|
||||
.data_region
|
||||
.space 0x4124
|
||||
.end_data_region
|
||||
|
||||
; CHECK: 4124{{.*}}adrp x0, 5 ; 0x9000
|
||||
adrp x0, #0x5000
|
Loading…
x
Reference in New Issue
Block a user