[PATCH] D16892: [lld] [ELF/AArch64] Add support to some GD/LE/IS TLS relocation
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 03:14:32 PST 2016
grimar added a subscriber: grimar.
================
Comment at: ELF/Target.cpp:1365-1366
@@ -1317,4 +1364,4 @@
uint64_t X = getAArch64Page(SA) - getAArch64Page(P);
- checkInt<33>(X, Type);
- updateAArch64Adr(Loc, (X >> 12) & 0x1FFFFF); // X[32:12]
+ checkInt<32>(X, Type);
+ updateAArch64Addr(Loc, (X >> 12) & 0x1FFFFF); // X[32:12]
break;
----------------
ruiu wrote:
> So, please leave "33" as is in this patch.
Btw, checkInt<> calls
```
template<unsigned N>
inline bool isInt(int64_t x) {
return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));
}
```
so that gives us -4294967296 <= x && x < 4294967296 which is valid check [32,32), no ?
http://reviews.llvm.org/D16892
More information about the llvm-commits
mailing list