1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

A fix for the previous commit: "integer constant is too large for ‘long’ type" error on some 32-bit bots

llvm-svn: 148232
This commit is contained in:
Eli Bendersky 2012-01-16 09:31:10 +00:00
parent 973d44eb7c
commit ed17ae8c86

View File

@ -183,9 +183,9 @@ void RuntimeDyldELF::resolveX86_64Relocation(StringRef Name,
case ELF::R_X86_64_32S: {
uint64_t Value = reinterpret_cast<uint64_t>(Addr) + RE.Addend;
// FIXME: Handle the possibility of this assertion failing
assert((RE.Type == ELF::R_X86_64_32 && !(Value & 0xFFFFFFFF00000000)) ||
assert((RE.Type == ELF::R_X86_64_32 && !(Value & 0xFFFFFFFF00000000ULL)) ||
(RE.Type == ELF::R_X86_64_32S &&
(Value & 0xFFFFFFFF00000000) == 0xFFFFFFFF00000000));
(Value & 0xFFFFFFFF00000000ULL) == 0xFFFFFFFF00000000ULL));
uint32_t TruncatedAddr = (Value & 0xFFFFFFFF);
uint32_t *Target = reinterpret_cast<uint32_t*>(TargetAddr);
*Target = TruncatedAddr;