Code style fixes.

This commit is contained in:
Jean-Philip Desjardins 2019-04-17 20:05:27 -04:00
parent 80ec1f9fc7
commit 734e0bc0e8
3 changed files with 17 additions and 18 deletions

View File

@ -7,6 +7,7 @@
#include "offsetof_def.h"
#include "placeholder_def.h"
// clang-format off
const CMA_MIPSIV::MemoryAccessTraits CMA_MIPSIV::g_byteAccessTraits =
{
reinterpret_cast<void*>(&MemoryUtils_GetByteProxy),
@ -57,7 +58,6 @@ const CMA_MIPSIV::MemoryAccessTraits CMA_MIPSIV::g_wordAccessTraits =
4
};
// clang-format off
static const uint32 g_LWMaskRight[4] =
{
0x00FFFFFF,

View File

@ -70,23 +70,22 @@ void CMA_MIPSIV::Template_Load32(const MemoryAccessTraits& traits)
if(m_nRT == 0) return;
const auto finishLoad =
[&] ()
{
if(traits.signExtFunction)
{
//SignExt to 32-bits (if needed)
((m_codeGen)->*(traits.signExtFunction))();
}
[&]() {
if(traits.signExtFunction)
{
//SignExt to 32-bits (if needed)
((m_codeGen)->*(traits.signExtFunction))();
}
//Sign extend to whole 64-bits
if(m_regSize == MIPS_REGSIZE_64)
{
m_codeGen->PushTop();
m_codeGen->SignExt();
m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRT].nV[1]));
}
m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRT].nV[0]));
};
//Sign extend to whole 64-bits
if(m_regSize == MIPS_REGSIZE_64)
{
m_codeGen->PushTop();
m_codeGen->SignExt();
m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRT].nV[1]));
}
m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRT].nV[0]));
};
bool usePageLookup = (m_pCtx->m_pageLookup != nullptr);

View File

@ -48,7 +48,7 @@ CMIPS::~CMIPS()
{
delete m_pMemoryMap;
delete m_analysis;
delete [] m_pageLookup;
delete[] m_pageLookup;
}
void CMIPS::Reset()