Skip to content

Commit

Permalink
Add AlignmentExceptions setting
Browse files Browse the repository at this point in the history
  • Loading branch information
JosJuice committed May 4, 2024
1 parent 5133e9a commit 398077c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Source/Core/Core/Config/MainSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ const Info<bool> MAIN_LOW_DCBZ_HACK{{System::Main, "Core", "LowDCBZHack"}, false
const Info<bool> MAIN_FLOAT_EXCEPTIONS{{System::Main, "Core", "FloatExceptions"}, false};
const Info<bool> MAIN_DIVIDE_BY_ZERO_EXCEPTIONS{{System::Main, "Core", "DivByZeroExceptions"},
false};
const Info<bool> MAIN_ALIGNMENT_EXCEPTIONS{{System::Main, "Core", "AlignmentExceptions"}, false};
const Info<bool> MAIN_FPRF{{System::Main, "Core", "FPRF"}, false};
const Info<bool> MAIN_ACCURATE_NANS{{System::Main, "Core", "AccurateNaNs"}, false};
const Info<bool> MAIN_DISABLE_ICACHE{{System::Main, "Core", "DisableICache"}, false};
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Config/MainSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ extern const Info<bool> MAIN_FAST_DISC_SPEED;
extern const Info<bool> MAIN_LOW_DCBZ_HACK;
extern const Info<bool> MAIN_FLOAT_EXCEPTIONS;
extern const Info<bool> MAIN_DIVIDE_BY_ZERO_EXCEPTIONS;
extern const Info<bool> MAIN_ALIGNMENT_EXCEPTIONS;
extern const Info<bool> MAIN_FPRF;
extern const Info<bool> MAIN_ACCURATE_NANS;
extern const Info<bool> MAIN_DISABLE_ICACHE;
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class NetPlayConfigLayerLoader final : public Config::ConfigLayerLoader
layer->Set(Config::GFX_PERF_QUERIES_ENABLE, m_settings.perf_queries_enable);
layer->Set(Config::MAIN_FLOAT_EXCEPTIONS, m_settings.float_exceptions);
layer->Set(Config::MAIN_DIVIDE_BY_ZERO_EXCEPTIONS, m_settings.divide_by_zero_exceptions);
layer->Set(Config::MAIN_ALIGNMENT_EXCEPTIONS, m_settings.alignment_exceptions);
layer->Set(Config::MAIN_FPRF, m_settings.fprf);
layer->Set(Config::MAIN_ACCURATE_NANS, m_settings.accurate_nans);
layer->Set(Config::MAIN_DISABLE_ICACHE, m_settings.disable_icache);
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/NetPlayClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ void NetPlayClient::OnStartGame(sf::Packet& packet)
packet >> m_net_settings.perf_queries_enable;
packet >> m_net_settings.float_exceptions;
packet >> m_net_settings.divide_by_zero_exceptions;
packet >> m_net_settings.alignment_exceptions;
packet >> m_net_settings.fprf;
packet >> m_net_settings.accurate_nans;
packet >> m_net_settings.disable_icache;
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/NetPlayProto.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct NetSettings
bool perf_queries_enable = false;
bool float_exceptions = false;
bool divide_by_zero_exceptions = false;
bool alignment_exceptions = false;
bool fprf = false;
bool accurate_nans = false;
bool disable_icache = false;
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/NetPlayServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,7 @@ bool NetPlayServer::SetupNetSettings()
settings.perf_queries_enable = Config::Get(Config::GFX_PERF_QUERIES_ENABLE);
settings.float_exceptions = Config::Get(Config::MAIN_FLOAT_EXCEPTIONS);
settings.divide_by_zero_exceptions = Config::Get(Config::MAIN_DIVIDE_BY_ZERO_EXCEPTIONS);
settings.alignment_exceptions = Config::Get(Config::MAIN_ALIGNMENT_EXCEPTIONS);
settings.fprf = Config::Get(Config::MAIN_FPRF);
settings.accurate_nans = Config::Get(Config::MAIN_ACCURATE_NANS);
settings.disable_icache = Config::Get(Config::MAIN_DISABLE_ICACHE);
Expand Down Expand Up @@ -1617,6 +1618,7 @@ bool NetPlayServer::StartGame()
spac << m_settings.perf_queries_enable;
spac << m_settings.float_exceptions;
spac << m_settings.divide_by_zero_exceptions;
spac << m_settings.alignment_exceptions;
spac << m_settings.fprf;
spac << m_settings.accurate_nans;
spac << m_settings.disable_icache;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/PowerPC/JitCommon/JitBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
// After resetting the stack to the top, we call _resetstkoflw() to restore
// the guard page at the 256kb mark.

const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 23> JitBase::JIT_SETTINGS{{
const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 24> JitBase::JIT_SETTINGS{{
{&JitBase::bJITOff, &Config::MAIN_DEBUG_JIT_OFF},
{&JitBase::bJITLoadStoreOff, &Config::MAIN_DEBUG_JIT_LOAD_STORE_OFF},
{&JitBase::bJITLoadStorelXzOff, &Config::MAIN_DEBUG_JIT_LOAD_STORE_LXZ_OFF},
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/PowerPC/JitCommon/JitBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class JitBase : public CPUCoreBase
bool m_cleanup_after_stackfault = false;
u8* m_stack_guard = nullptr;

static const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 23> JIT_SETTINGS;
static const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 24> JIT_SETTINGS;

bool DoesConfigNeedRefresh();
void RefreshConfig();
Expand Down

0 comments on commit 398077c

Please sign in to comment.