summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Chat <arkolbed@gmail.com>2018-05-03 22:12:36 -0500
committerDr. Chat <arkolbed@gmail.com>2018-05-03 22:12:36 -0500
commit198cc9b9b908c1facd6bd3357e149636b4d12305 (patch)
tree373d711ff0ec598face6ae5efb085df4fdd0c4a1
parent926b133a0ffd61d54ba21b16635059be45d602e4 (diff)
[CPU] Print a message and crash if the CPU does not support AVX.
-rw-r--r--src/xenia/cpu/backend/x64/x64_backend.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xenia/cpu/backend/x64/x64_backend.cc b/src/xenia/cpu/backend/x64/x64_backend.cc
index 7739c9519..3390869e5 100644
--- a/src/xenia/cpu/backend/x64/x64_backend.cc
+++ b/src/xenia/cpu/backend/x64/x64_backend.cc
@@ -13,7 +13,9 @@
#include "third_party/capstone/include/capstone.h"
#include "third_party/capstone/include/x86.h"
+
#include "xenia/base/exception_handler.h"
+#include "xenia/base/logging.h"
#include "xenia/cpu/backend/x64/x64_assembler.h"
#include "xenia/cpu/backend/x64/x64_code_cache.h"
#include "xenia/cpu/backend/x64/x64_emitter.h"
@@ -65,11 +67,16 @@ bool X64Backend::Initialize(Processor* processor) {
return false;
}
+ Xbyak::util::Cpu cpu;
+ if (!cpu.has(Xbyak::util::Cpu::tAVX)) {
+ XELOGE("This CPU does not support AVX. The emulator will now crash.");
+ return false;
+ }
+
RegisterSequences();
// Need movbe to do advanced LOAD/STORE tricks.
if (FLAGS_enable_haswell_instructions) {
- Xbyak::util::Cpu cpu;
machine_info_.supports_extended_load_store =
cpu.has(Xbyak::util::Cpu::tMOVBE);
} else {