android: Add cpu bakend gui toggle
This commit is contained in:
parent
9f91ba1f73
commit
8fab363237
11 changed files with 43 additions and 9 deletions
|
@ -363,13 +363,13 @@ private:
|
|||
|
||||
#ifdef ARCHITECTURE_arm64
|
||||
|
||||
uint64_t GetRandomU64() {
|
||||
static uint64_t GetRandomU64() {
|
||||
uint64_t ret;
|
||||
ASSERT(getrandom(&ret, sizeof(ret), 0) == 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void* ChooseVirtualBase(size_t virtual_size) {
|
||||
static void* ChooseVirtualBase(size_t virtual_size) {
|
||||
constexpr uintptr_t Map39BitSize = (1ULL << 39);
|
||||
constexpr uintptr_t Map36BitSize = (1ULL << 36);
|
||||
|
||||
|
@ -410,7 +410,7 @@ void* ChooseVirtualBase(size_t virtual_size) {
|
|||
return MAP_FAILED;
|
||||
}
|
||||
#else
|
||||
void* ChooseVirtualBase(size_t virtual_size) {
|
||||
static void* ChooseVirtualBase(size_t virtual_size) {
|
||||
return mmap(nullptr, virtual_size, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
|
||||
}
|
||||
|
|
|
@ -159,7 +159,13 @@ bool IsFastmemEnabled() {
|
|||
static bool is_nce_enabled = false;
|
||||
|
||||
void SetNceEnabled(bool is_39bit) {
|
||||
is_nce_enabled = values.cpu_backend.GetValue() == CpuBackend::Nce && is_39bit;
|
||||
const bool is_nce_selected = values.cpu_backend.GetValue() == CpuBackend::Nce;
|
||||
is_nce_enabled = is_nce_selected && is_39bit;
|
||||
if (is_nce_selected && !is_nce_enabled) {
|
||||
LOG_WARNING(
|
||||
Common,
|
||||
"Program does not utilize 39-bit address space, unable to natively execute code");
|
||||
}
|
||||
}
|
||||
|
||||
bool IsNceEnabled() {
|
||||
|
|
|
@ -18,7 +18,7 @@ T* LookupLibcSymbol(const char* name) {
|
|||
UNREACHABLE_MSG("Failed to open libc!");
|
||||
}
|
||||
#else
|
||||
// For other operating environments, we assume the symbol is not overriden.
|
||||
// For other operating environments, we assume the symbol is not overridden.
|
||||
const char* base = nullptr;
|
||||
Common::DynamicLibrary provider(base);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue