upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/main.cpp')
-rw-r--r--runtime/src/main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp
index c8545f338..37ce6656c 100644
--- a/runtime/src/main.cpp
+++ b/runtime/src/main.cpp
@@ -176,8 +176,10 @@ void start_title_peek(std::uint8_t* base) {
176 176
177} // namespace 177} // namespace
178 178
179#include "avx2_emulation.h"
179#include "base_reservation.h" 180#include "base_reservation.h"
180#include "compile_gate_policy.h" 181#include "compile_gate_policy.h"
182#include "bmi_emulation.h"
181#include "code_hooks.h" 183#include "code_hooks.h"
182#include "cpu_emulation.h" 184#include "cpu_emulation.h"
183#include "host_cpu.h" 185#include "host_cpu.h"
@@ -559,6 +561,19 @@ int wmain(int argc, wchar_t** argv) {
559 if (!rt::cpu_emulation::install()) 561 if (!rt::cpu_emulation::install())
560 std::fprintf(stderr, "[rt] cpu: AddVectoredExceptionHandler failed (error %lu); instructions this CPU lacks " 562 std::fprintf(stderr, "[rt] cpu: AddVectoredExceptionHandler failed (error %lu); instructions this CPU lacks "
561 "will stop the game\n", GetLastError()); 563 "will stop the game\n", GetLastError());
564 if (const auto bmi = rt::bmi_emulation::detect_host(); !bmi.bmi1 || !bmi.bmi2 || !bmi.lzcnt || !bmi.movbe)
565 std::fprintf(stderr, "[rt] cpu: this CPU lacks%s%s%s%s; the game's uses are emulated (docs/cpu_features.md)\n",
566 bmi.bmi1 ? "" : " BMI1", bmi.bmi2 ? "" : " BMI2", bmi.lzcnt ? "" : " LZCNT",
567 bmi.movbe ? "" : " MOVBE");
568 if (!rt::bmi_emulation::install())
569 std::fprintf(stderr, "[rt] cpu: AddVectoredExceptionHandler (BMI) failed (error %lu); instructions this CPU "
570 "lacks will stop the game\n", GetLastError());
571 if (const auto avx2 = rt::avx2_emulation::detect_host(); !avx2.avx2 || !avx2.fma || !avx2.f16c)
572 std::fprintf(stderr, "[rt] cpu: this CPU lacks%s%s%s; the game's uses are emulated (docs/cpu_features.md)\n",
573 avx2.avx2 ? "" : " AVX2", avx2.fma ? "" : " FMA3", avx2.f16c ? "" : " F16C");
574 if (!rt::avx2_emulation::install())
575 std::fprintf(stderr, "[rt] cpu: AddVectoredExceptionHandler (AVX2) failed (error %lu); instructions this CPU "
576 "lacks will stop the game\n", GetLastError());
562 577
563 try { 578 try {
564 rt::Loader loader(game_dir); 579 rt::Loader loader(game_dir);