[lld] r254326 - ELF: Make comments consistent.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 13:00:53 PST 2015
Author: ruiu
Date: Mon Nov 30 15:00:53 2015
New Revision: 254326
URL: http://llvm.org/viewvc/llvm-project?rev=254326&view=rev
Log:
ELF: Make comments consistent.
In other places, we don't have the comment. Absence of check{Int,UInt}
is the sign that no overflow check is needed.
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=254326&r1=254325&r2=254326&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Mon Nov 30 15:00:53 2015
@@ -948,11 +948,9 @@ void AArch64TargetInfo::relocateOne(uint
write32le(Loc, SA);
break;
case R_AARCH64_ABS64:
- // No overflow check needed.
write64le(Loc, SA);
break;
case R_AARCH64_ADD_ABS_LO12_NC:
- // No overflow check needed.
// This relocation stores 12 bits and there's no instruction
// to do it. Instead, we do a 32 bits store of the value
// of r_addend bitwise-or'ed Loc. This assumes that the addend
@@ -980,20 +978,16 @@ void AArch64TargetInfo::relocateOne(uint
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_PREL16:
@@ -1005,7 +999,6 @@ void AArch64TargetInfo::relocateOne(uint
write32le(Loc, SA - P);
break;
case R_AARCH64_PREL64:
- // No overflow check needed.
write64le(Loc, SA - P);
break;
default:
More information about the llvm-commits
mailing list