[lld] r249198 - [ELF2/AArch64] Add comment and change name to match the one of the ABI.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 15:13:51 PDT 2015


Author: davide
Date: Fri Oct  2 17:13:51 2015
New Revision: 249198

URL: http://llvm.org/viewvc/llvm-project?rev=249198&view=rev
Log:
[ELF2/AArch64] Add comment and change name to match the one of the ABI.

Fix style while I'm here.

Modified:
    lld/trunk/ELF/Target.cpp

Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=249198&r1=249197&r2=249198&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Fri Oct  2 17:13:51 2015
@@ -260,8 +260,11 @@ static void AArch64UpdateAdr(uint8_t *Lo
   write32le(Location, (read32le(Location) & ~Mask) | ImmLo | ImmHi);
 }
 
-static uint64_t AArch64GetPage(uint64_t Address) {
-  return (Address & (~static_cast<uint64_t>(0xFFF)));
+// Page(Expr) is the page address of the expression Expr, defined
+// as (Expr & ~0xFFF). (This applies even if the machine page size
+// supported by the platform has a differen value).
+static uint64_t AArch64GetPage(uint64_t Expr) {
+  return Expr & (~static_cast<uint64_t>(0xFFF));
 }
 
 static void handle_ADR_PREL_LO21(uint8_t *Location, uint64_t S, int64_t A,




More information about the llvm-commits mailing list