Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ARM] dcbst implementation.
  • Loading branch information
Sonicadvance1 committed Aug 4, 2013
1 parent 522d38d commit bafed34
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions Source/Core/Core/Src/PowerPC/JitArm32/Jit.h
Expand Up @@ -172,6 +172,7 @@ class JitArm : public JitBase, public ArmGen::ARMXCodeBlock

// LoadStore
void icbi(UGeckoInstruction _inst);
void dcbst(UGeckoInstruction _inst);
void lbz(UGeckoInstruction _inst);
void lhz(UGeckoInstruction _inst);
void lha(UGeckoInstruction _inst);
Expand Down
15 changes: 15 additions & 0 deletions Source/Core/Core/Src/PowerPC/JitArm32/JitArm_LoadStore.cpp
Expand Up @@ -615,6 +615,21 @@ void JitArm::lwzx(UGeckoInstruction inst)
SetJumpTarget(DoNotLoad);
//// u32 temp = Memory::Read_U32(_inst.RA ? (m_GPR[_inst.RA] + m_GPR[_inst.RB]) : m_GPR[_inst.RB]);
}

void JitArm::dcbst(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(LoadStore)

// If the dcbst instruction is preceded by dcbt, it is flushing a prefetched
// memory location. Do not invalidate the JIT cache in this case as the memory
// will be the same.
// dcbt = 0x7c00022c
if ((Memory::ReadUnchecked_U32(js.compilerPC - 4) & 0x7c00022c) != 0x7c00022c)
{
Default(inst); return;
}
}
void JitArm::icbi(UGeckoInstruction inst)
{
Default(inst);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Tables.cpp
Expand Up @@ -212,7 +212,7 @@ static GekkoOPTemplate table31[] =
{824, &JitArm::Default}, //"srawix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}},
{24, &JitArm::Default}, //"slwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}},

{54, &JitArm::Default}, //"dcbst", OPTYPE_DCACHE, 0, 4}},
{54, &JitArm::dcbst}, //"dcbst", OPTYPE_DCACHE, 0, 4}},
{86, &JitArm::Default}, //"dcbf", OPTYPE_DCACHE, 0, 4}},
{246, &JitArm::Default}, //"dcbtst", OPTYPE_DCACHE, 0, 1}},
{278, &JitArm::Default}, //"dcbt", OPTYPE_DCACHE, 0, 1}},
Expand Down

0 comments on commit bafed34

Please sign in to comment.