diff options
Diffstat (limited to 'runtime/src/main.cpp')
| -rw-r--r-- | runtime/src/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index c8545f338..a797fc19c 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -178,6 +178,7 @@ void start_title_peek(std::uint8_t* base) { | |||
| 178 | 178 | ||
| 179 | #include "base_reservation.h" | 179 | #include "base_reservation.h" |
| 180 | #include "compile_gate_policy.h" | 180 | #include "compile_gate_policy.h" |
| 181 | #include "bmi_emulation.h" | ||
| 181 | #include "code_hooks.h" | 182 | #include "code_hooks.h" |
| 182 | #include "cpu_emulation.h" | 183 | #include "cpu_emulation.h" |
| 183 | #include "host_cpu.h" | 184 | #include "host_cpu.h" |
| @@ -559,6 +560,13 @@ int wmain(int argc, wchar_t** argv) { | |||
| 559 | if (!rt::cpu_emulation::install()) | 560 | if (!rt::cpu_emulation::install()) |
| 560 | std::fprintf(stderr, "[rt] cpu: AddVectoredExceptionHandler failed (error %lu); instructions this CPU lacks " | 561 | std::fprintf(stderr, "[rt] cpu: AddVectoredExceptionHandler failed (error %lu); instructions this CPU lacks " |
| 561 | "will stop the game\n", GetLastError()); | 562 | "will stop the game\n", GetLastError()); |
| 563 | if (const auto bmi = rt::bmi_emulation::detect_host(); !bmi.bmi1 || !bmi.bmi2 || !bmi.lzcnt || !bmi.movbe) | ||
| 564 | std::fprintf(stderr, "[rt] cpu: this CPU lacks%s%s%s%s; the game's uses are emulated (docs/cpu_features.md)\n", | ||
| 565 | bmi.bmi1 ? "" : " BMI1", bmi.bmi2 ? "" : " BMI2", bmi.lzcnt ? "" : " LZCNT", | ||
| 566 | bmi.movbe ? "" : " MOVBE"); | ||
| 567 | if (!rt::bmi_emulation::install()) | ||
| 568 | std::fprintf(stderr, "[rt] cpu: AddVectoredExceptionHandler (BMI) failed (error %lu); instructions this CPU " | ||
| 569 | "lacks will stop the game\n", GetLastError()); | ||
| 562 | 570 | ||
| 563 | try { | 571 | try { |
| 564 | rt::Loader loader(game_dir); | 572 | rt::Loader loader(game_dir); |