Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: remove unnecessary uses of the bMMU flag #1647

Merged
merged 2 commits into from
Dec 7, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions Source/Core/Core/HLE/HLE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ int GetFunctionFlagsByIndex(u32 index)

bool IsEnabled(int flags)
{
if (flags == HLE::HLE_TYPE_MEMORY && SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
return false;

if (flags == HLE::HLE_TYPE_DEBUG && !SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging && PowerPC::GetMode() != MODE_INTERPRETER)

This comment was marked as off-topic.

This comment was marked as off-topic.

return false;

Expand Down
4 changes: 1 addition & 3 deletions Source/Core/Core/HLE/HLE.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ namespace HLE
enum
{
HLE_TYPE_GENERIC = 0, // Miscellaneous function
HLE_TYPE_MEMORY = 1, // Memory operation
HLE_TYPE_FP = 2, // Floating Point operation
HLE_TYPE_DEBUG = 3, // Debug output function
HLE_TYPE_DEBUG = 1, // Debug output function
};

void PatchFunctions();
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void EmuCodeBlock::SafeLoadToReg(X64Reg reg_value, const Gen::OpArg & opAddress,
{
registersInUse[reg_value] = false;
}
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU &&
if (!jit->js.memcheck &&
SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem &&
!opAddress.IsImm() &&
!(flags & (SAFE_LOADSTORE_NO_SWAP | SAFE_LOADSTORE_NO_FASTMEM))
Expand Down Expand Up @@ -333,7 +333,7 @@ void EmuCodeBlock::SafeLoadToReg(X64Reg reg_value, const Gen::OpArg & opAddress,
{
UnsafeLoadToReg(reg_value, opAddress, accessSize, offset, signExtend);
}
else if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU && MMIO::IsMMIOAddress(address) && accessSize != 64)
else if (MMIO::IsMMIOAddress(address) && accessSize != 64)
{
MMIOLoadToReg(Memory::mmio_mapping, reg_value, registersInUse,
address, accessSize, signExtend);
Expand Down Expand Up @@ -548,7 +548,7 @@ void EmuCodeBlock::SafeWriteRegToReg(OpArg reg_value, X64Reg reg_addr, int acces
reg_value = FixImmediate(accessSize, reg_value);

// TODO: support byte-swapped non-immediate fastmem stores
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU &&
if (!jit->js.memcheck &&
SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem &&
!(flags & SAFE_LOADSTORE_NO_FASTMEM) &&
(reg_value.IsImm() || !(flags & SAFE_LOADSTORE_NO_SWAP))
Expand Down