[llvm] r365661 - MC: AArch64: Add support for pg_hi21_nc relocation specifier.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 09:36:46 PDT 2019
Author: pcc
Date: Wed Jul 10 09:36:46 2019
New Revision: 365661
URL: http://llvm.org/viewvc/llvm-project?rev=365661&view=rev
Log:
MC: AArch64: Add support for pg_hi21_nc relocation specifier.
Differential Revision: https://reviews.llvm.org/D64455
Added:
llvm/trunk/test/MC/AArch64/adrp-relocation2.s
Modified:
llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
Modified: llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp?rev=365661&r1=365660&r2=365661&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp Wed Jul 10 09:36:46 2019
@@ -2502,6 +2502,7 @@ AArch64AsmParser::tryParseAdrpLabel(Oper
} else if (DarwinRefKind != MCSymbolRefExpr::VK_PAGE &&
DarwinRefKind != MCSymbolRefExpr::VK_GOTPAGE &&
DarwinRefKind != MCSymbolRefExpr::VK_TLVPPAGE &&
+ ELFRefKind != AArch64MCExpr::VK_ABS_PAGE_NC &&
ELFRefKind != AArch64MCExpr::VK_GOT_PAGE &&
ELFRefKind != AArch64MCExpr::VK_GOTTPREL_PAGE &&
ELFRefKind != AArch64MCExpr::VK_TLSDESC_PAGE) {
@@ -3267,6 +3268,7 @@ bool AArch64AsmParser::parseSymbolicImmV
.Case("dtprel_hi12", AArch64MCExpr::VK_DTPREL_HI12)
.Case("dtprel_lo12", AArch64MCExpr::VK_DTPREL_LO12)
.Case("dtprel_lo12_nc", AArch64MCExpr::VK_DTPREL_LO12_NC)
+ .Case("pg_hi21_nc", AArch64MCExpr::VK_ABS_PAGE_NC)
.Case("tprel_g2", AArch64MCExpr::VK_TPREL_G2)
.Case("tprel_g1", AArch64MCExpr::VK_TPREL_G1)
.Case("tprel_g1_nc", AArch64MCExpr::VK_TPREL_G1_NC)
Added: llvm/trunk/test/MC/AArch64/adrp-relocation2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/adrp-relocation2.s?rev=365661&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/adrp-relocation2.s (added)
+++ llvm/trunk/test/MC/AArch64/adrp-relocation2.s Wed Jul 10 09:36:46 2019
@@ -0,0 +1,7 @@
+// RUN: llvm-mc -triple=aarch64-linux-gnu -filetype=obj -o - %s | llvm-readobj -r - | FileCheck %s
+
+// CHECK: R_AARCH64_ADR_PREL_PG_HI21_NC sym
+adrp x0, :pg_hi21_nc:sym
+
+.globl sym
+sym:
More information about the llvm-commits
mailing list