[PATCH] D40423: [ARM][AArch64] Workaround ARMv8.2 percularity in clearing icache.
Maxim Kuvyrkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 24 04:43:09 PST 2017
maxim-kuvyrkov added a comment.
I've successfully tested an earlier version of this patch, but not the uploaded version yet. Please review, but don't submit until testing is finished.
================
Comment at: lib/Support/Unix/Memory.inc:172
+ // to temporarily add PROT_READ for the sake of flushing the instruction caches.
+ if (InvalidateCache && !(Protect && PROT_READ)) {
+ int Result = ::mprotect((void *)Start, End - Start, Protect | PROT_READ);
----------------
jgreenhalgh wrote:
> Probably this should be !(Protect & PROT_READ)
Indeed! Thanks.
https://reviews.llvm.org/D40423
More information about the llvm-commits
mailing list