mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:50:30 +00:00
AArch64/ARM64: support relocated ADR instruction
llvm-svn: 207109
This commit is contained in:
parent
58031e937f
commit
e881c63815
@ -67,7 +67,8 @@ unsigned ARM64ELFObjectWriter::GetRelocType(const MCValue &Target,
|
||||
case FK_Data_8:
|
||||
return ELF::R_AARCH64_PREL64;
|
||||
case ARM64::fixup_arm64_pcrel_adr_imm21:
|
||||
llvm_unreachable("No ELF relocations supported for ADR at the moment");
|
||||
assert(SymLoc == ARM64MCExpr::VK_NONE && "unexpected ADR relocation");
|
||||
return ELF::R_AARCH64_ADR_PREL_LO21;
|
||||
case ARM64::fixup_arm64_pcrel_adrp_imm21:
|
||||
if (SymLoc == ARM64MCExpr::VK_ABS && !IsNC)
|
||||
return ELF::R_AARCH64_ADR_PREL_PG_HI21;
|
||||
|
@ -1,6 +1,9 @@
|
||||
// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \
|
||||
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
|
||||
|
||||
// RUN: llvm-mc -triple=arm64-none-linux-gnu -filetype=obj %s -o - | \
|
||||
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
|
||||
|
||||
adr x2, some_label
|
||||
adrp x5, some_label
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user