[Memory/CPU] UWP: Support separate code execution and write memory, FromApp functions + other Windows memory fixes

This commit is contained in:
Triang3l
2020-11-24 22:18:50 +03:00
parent cabd28b9bb
commit a73592c2ef
15 changed files with 348 additions and 113 deletions

View File

@@ -8,11 +8,26 @@
*/
#include "xenia/base/memory.h"
#include "xenia/base/cvar.h"
#include "xenia/base/platform.h"
#include <algorithm>
DEFINE_bool(
writable_executable_memory, true,
"Allow mapping memory with both write and execute access, for simulating "
"behavior on platforms where that's not supported",
"Memory");
namespace xe {
namespace memory {
bool IsWritableExecutableMemoryPreferred() {
return IsWritableExecutableMemorySupported() &&
cvars::writable_executable_memory;
}
} // namespace memory
// TODO(benvanik): fancy AVX versions.
// https://github.com/gnuradio/volk/blob/master/kernels/volk/volk_16u_byteswap.h