[PATCH] D42421: [LLD][ELF] Make --fix-cortex-a53-843419 work on big endian hosts
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 10:21:15 PST 2018
LGTM
Peter Smith via Phabricator <reviews at reviews.llvm.org> writes:
> peter.smith updated this revision to Diff 131083.
> peter.smith added a comment.
>
> Spoke to soon, forgot to correct the last ulittle32_t that was hiding from me. Now updated.
>
>
> https://reviews.llvm.org/D42421
>
> Files:
> ELF/AArch64ErrataFix.cpp
>
>
> Index: ELF/AArch64ErrataFix.cpp
> ===================================================================
> --- ELF/AArch64ErrataFix.cpp
> +++ ELF/AArch64ErrataFix.cpp
> @@ -47,6 +47,7 @@
> using namespace llvm;
> using namespace llvm::ELF;
> using namespace llvm::object;
> +using namespace llvm::support;
> using namespace llvm::support::endian;
>
> using namespace lld;
> @@ -357,7 +358,7 @@
>
> uint64_t PatchOff = 0;
> const uint8_t *Buf = IS->Data.begin();
> - const uint32_t *InstBuf = reinterpret_cast<const uint32_t *>(Buf + Off);
> + const ulittle32_t *InstBuf = reinterpret_cast<const ulittle32_t *>(Buf + Off);
> uint32_t Instr1 = *InstBuf++;
> uint32_t Instr2 = *InstBuf++;
> uint32_t Instr3 = *InstBuf++;
>
>
> Index: ELF/AArch64ErrataFix.cpp
> ===================================================================
> --- ELF/AArch64ErrataFix.cpp
> +++ ELF/AArch64ErrataFix.cpp
> @@ -47,6 +47,7 @@
> using namespace llvm;
> using namespace llvm::ELF;
> using namespace llvm::object;
> +using namespace llvm::support;
> using namespace llvm::support::endian;
>
> using namespace lld;
> @@ -357,7 +358,7 @@
>
> uint64_t PatchOff = 0;
> const uint8_t *Buf = IS->Data.begin();
> - const uint32_t *InstBuf = reinterpret_cast<const uint32_t *>(Buf + Off);
> + const ulittle32_t *InstBuf = reinterpret_cast<const ulittle32_t *>(Buf + Off);
> uint32_t Instr1 = *InstBuf++;
> uint32_t Instr2 = *InstBuf++;
> uint32_t Instr3 = *InstBuf++;
More information about the llvm-commits
mailing list