Core/PowerPC: Add option to disable branch following
This commit is contained in:
1 parent
8c97fb7cd4
commit
df61e527da
7 files changed
+14
-3
No files matched your search
@@ -14,6 +14,7 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/PowerPC/JitCommon/JitBase.h"
|
||||
#include "Core/PowerPC/MMU.h"
|
||||
@@ -671,6 +672,8 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, std:
|
||||
u32 numFollows = 0;
|
||||
u32 num_inst = 0;
|
||||
|
||||
const bool enable_follow = SConfig::GetInstance().bJITFollowBranch;
|
||||
|
||||
for (std::size_t i = 0; i < block_size; ++i)
|
||||
{
|
||||
auto result = PowerPC::TryReadInstruction(address);
|
||||
@@ -706,7 +709,7 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, std:
|
||||
// If it is small, the performance will be down.
|
||||
// If it is big, the size of generated code will be big and
|
||||
// cache clearning will happen many times.
|
||||
if (HasOption(OPTION_BRANCH_FOLLOW) && numFollows < BRANCH_FOLLOWING_THRESHOLD)
|
||||
if (enable_follow && HasOption(OPTION_BRANCH_FOLLOW) && numFollows < BRANCH_FOLLOWING_THRESHOLD)
|
||||
{
|
||||
if (inst.OPCD == 18 && block_size > 1)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user