[llvm] r175646 - On PowerPC, the cache-flush instructions dcbf and icbi are treated as
Krzysztof Parzyszek
kparzysz at codeaurora.org
Wed Feb 20 10:24:30 PST 2013
Author: kparzysz
Date: Wed Feb 20 12:24:30 2013
New Revision: 175646
URL: http://llvm.org/viewvc/llvm-project?rev=175646&view=rev
Log:
On PowerPC, the cache-flush instructions dcbf and icbi are treated as
loads. On FreeBSD, add PROT_READ page protection flag before flushing
cache.
Modified:
llvm/trunk/lib/Support/Unix/Memory.inc
Modified: llvm/trunk/lib/Support/Unix/Memory.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Memory.inc?rev=175646&r1=175645&r2=175646&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Memory.inc (original)
+++ llvm/trunk/lib/Support/Unix/Memory.inc Wed Feb 20 12:24:30 2013
@@ -51,7 +51,11 @@ int getPosixProtectionFlags(unsigned Fla
llvm::sys::Memory::MF_EXEC:
return PROT_READ | PROT_WRITE | PROT_EXEC;
case llvm::sys::Memory::MF_EXEC:
+#if defined(__FreeBSD__)
+ return PROT_READ | PROT_EXEC;
+#else
return PROT_EXEC;
+#endif
default:
llvm_unreachable("Illegal memory protection flag specified!");
}
More information about the llvm-commits
mailing list