[PATCH] D15045: [ELF/AArch64] Rearrange AArch64 relocations in alphabetical order. NFC.
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 27 08:26:33 PST 2015
ikudrin retitled this revision from "[ELF/AArch64] Rearrange relocations to follow the documentation order. NFC." to "[ELF/AArch64] Rearrange AArch64 relocations in alphabetical order. NFC.".
ikudrin updated this revision to Diff 41313.
ikudrin added a comment.
- Rearranged alphabetically.
http://reviews.llvm.org/D15045
Files:
ELF/Target.cpp
Index: ELF/Target.cpp
===================================================================
--- ELF/Target.cpp
+++ ELF/Target.cpp
@@ -959,43 +959,48 @@
// bits in Loc are zero.
or32le(Loc, (SA & 0xFFF) << 10);
break;
+ case R_AARCH64_ADR_GOT_PAGE: {
+ uint64_t X = getAArch64Page(SA) - getAArch64Page(P);
+ checkInt<33>(X, Type);
+ updateAArch64Adr(Loc, (X >> 12) & 0x1FFFFF); // X[32:12]
+ break;
+ }
case R_AARCH64_ADR_PREL_LO21: {
uint64_t X = SA - P;
checkInt<21>(X, Type);
updateAArch64Adr(Loc, X & 0x1FFFFF);
break;
}
- case R_AARCH64_ADR_GOT_PAGE:
case R_AARCH64_ADR_PREL_PG_HI21: {
uint64_t X = getAArch64Page(SA) - getAArch64Page(P);
checkInt<33>(X, Type);
updateAArch64Adr(Loc, (X >> 12) & 0x1FFFFF); // X[32:12]
break;
}
- case R_AARCH64_JUMP26:
- case R_AARCH64_CALL26: {
+ case R_AARCH64_CALL26:
+ case R_AARCH64_JUMP26: {
uint64_t X = SA - P;
checkInt<28>(X, Type);
or32le(Loc, (X & 0x0FFFFFFC) >> 2);
break;
}
- case R_AARCH64_LDST32_ABS_LO12_NC:
- // No overflow check needed.
- or32le(Loc, (SA & 0xFFC) << 8);
- break;
case R_AARCH64_LD64_GOT_LO12_NC:
checkAlignment<8>(SA, Type);
// No overflow check needed.
or32le(Loc, (SA & 0xFF8) << 7);
break;
- case R_AARCH64_LDST64_ABS_LO12_NC:
- // No overflow check needed.
- or32le(Loc, (SA & 0xFF8) << 7);
- break;
case R_AARCH64_LDST8_ABS_LO12_NC:
// No overflow check needed.
or32le(Loc, (SA & 0xFFF) << 10);
break;
+ case R_AARCH64_LDST32_ABS_LO12_NC:
+ // No overflow check needed.
+ or32le(Loc, (SA & 0xFFC) << 8);
+ break;
+ case R_AARCH64_LDST64_ABS_LO12_NC:
+ // No overflow check needed.
+ or32le(Loc, (SA & 0xFF8) << 7);
+ break;
case R_AARCH64_PREL16:
checkIntUInt<16>(SA - P, Type);
write16le(Loc, SA - P);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15045.41313.patch
Type: text/x-patch
Size: 1882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151127/125de5e8/attachment.bin>
More information about the llvm-commits
mailing list