[PATCH] D35646: [lld] [COFF] Minor tweaks to ARM64 relocation code. NFC.
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 14:40:22 PDT 2017
mstorsjo updated this revision to Diff 107384.
mstorsjo retitled this revision from "[lld] [COFF] Change the data type of a variable to uint32_t. NFC." to "[lld] [COFF] Minor tweaks to ARM64 relocation code. NFC.".
mstorsjo edited the summary of this revision.
mstorsjo added a comment.
Herald added subscribers: kristof.beyls, aemerson.
Moving a shift as well.
https://reviews.llvm.org/D35646
Files:
COFF/Chunks.cpp
Index: COFF/Chunks.cpp
===================================================================
--- COFF/Chunks.cpp
+++ COFF/Chunks.cpp
@@ -183,11 +183,10 @@
}
static void applyArm64Ldr(uint8_t *Off, uint64_t Imm) {
- int Size = read32le(Off) >> 30;
+ uint32_t Size = read32le(Off) >> 30;
if ((Imm & ((1 << Size) - 1)) != 0)
fatal("misaligned ldr/str offset");
- Imm >>= Size;
- applyArm64Imm(Off, Imm);
+ applyArm64Imm(Off, Imm >> Size);
}
void SectionChunk::applyRelARM64(uint8_t *Off, uint16_t Type, OutputSection *OS,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35646.107384.patch
Type: text/x-patch
Size: 538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170719/5af73716/attachment.bin>
More information about the llvm-commits
mailing list