<div dir="ltr">Merged to 6.0 in r323750.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 23, 2018 at 8:26 PM, Peter Smith via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: psmith<br>
Date: Tue Jan 23 11:26:52 2018<br>
New Revision: 323243<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=323243&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=323243&view=rev</a><br>
Log:<br>
[ELF] Make --fix-cortex-a53-843419 work on big endian hosts<br>
<br>
The reinterpret cast to uint32_t to read the little-endian instructions<br>
will only work on a little endian system. Use ulittle32_t to always read<br>
little-endian (AArch64 instructions are always little endian).<br>
<br>
Fixes PR36056<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D42421" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D42421</a><br>
<br>
Modified:<br>
    lld/trunk/ELF/<wbr>AArch64ErrataFix.cpp<br>
<br>
Modified: lld/trunk/ELF/<wbr>AArch64ErrataFix.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/AArch64ErrataFix.cpp?rev=323243&r1=323242&r2=323243&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/ELF/<wbr>AArch64ErrataFix.cpp?rev=<wbr>323243&r1=323242&r2=323243&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/ELF/<wbr>AArch64ErrataFix.cpp (original)<br>
+++ lld/trunk/ELF/<wbr>AArch64ErrataFix.cpp Tue Jan 23 11:26:52 2018<br>
@@ -47,6 +47,7 @@<br>
 using namespace llvm;<br>
 using namespace llvm::ELF;<br>
 using namespace llvm::object;<br>
+using namespace llvm::support;<br>
 using namespace llvm::support::endian;<br>
<br>
 using namespace lld;<br>
@@ -357,7 +358,7 @@ static uint64_t scanCortexA53Errata84341<br>
<br>
   uint64_t PatchOff = 0;<br>
   const uint8_t *Buf = IS->Data.begin();<br>
-  const uint32_t *InstBuf = reinterpret_cast<const uint32_t *>(Buf + Off);<br>
+  const ulittle32_t *InstBuf = reinterpret_cast<const ulittle32_t *>(Buf + Off);<br>
   uint32_t Instr1 = *InstBuf++;<br>
   uint32_t Instr2 = *InstBuf++;<br>
   uint32_t Instr3 = *InstBuf++;<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>