summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/PPCReference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/PPCReference.cpp')
-rw-r--r--lld/lib/ReaderWriter/ELF/PPCReference.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/ELF/PPCReference.cpp b/lld/lib/ReaderWriter/ELF/PPCReference.cpp
index 01291e9f4e8..ec7df8f3a4c 100644
--- a/lld/lib/ReaderWriter/ELF/PPCReference.cpp
+++ b/lld/lib/ReaderWriter/ELF/PPCReference.cpp
@@ -46,7 +46,7 @@ int relocB24PCREL(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) {
if ((result < 0x1000000) && (result > -0x1000000)) {
result &= ~-(0x1000000);
*reinterpret_cast<llvm::support::ubig32_t *>(location) = result |
- *reinterpret_cast<llvm::support::ubig32_t *>(location);
+ (uint32_t)*reinterpret_cast<llvm::support::ubig32_t *>(location);
return PPCKindHandler::NoError;
}
return PPCKindHandler::Overflow;
OpenPOWER on IntegriCloud