mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Add comment in Memory.inc explaining r175646.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175650 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
09adcf7dca
commit
033ee0f111
@ -52,6 +52,13 @@ int getPosixProtectionFlags(unsigned Flags) {
|
|||||||
return PROT_READ | PROT_WRITE | PROT_EXEC;
|
return PROT_READ | PROT_WRITE | PROT_EXEC;
|
||||||
case llvm::sys::Memory::MF_EXEC:
|
case llvm::sys::Memory::MF_EXEC:
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
|
// On PowerPC, having an executable page that has no read permission
|
||||||
|
// can have unintended consequences. The function InvalidateInstruction-
|
||||||
|
// Cache uses instructions dcbf and icbi, both of which are treated by
|
||||||
|
// the processor as loads. If the page has no read permissions,
|
||||||
|
// executing these instructions will result in a segmentation fault.
|
||||||
|
// Somehow, this problem is not present on Linux, but it does happen
|
||||||
|
// on FreeBSD.
|
||||||
return PROT_READ | PROT_EXEC;
|
return PROT_READ | PROT_EXEC;
|
||||||
#else
|
#else
|
||||||
return PROT_EXEC;
|
return PROT_EXEC;
|
||||||
|
Loading…
Reference in New Issue
Block a user