ee: directly call EMMS from dispatcher

Until we completely remove MMX from the recompiler
This commit is contained in:
Gregory Hainaut 2016-01-09 19:57:28 +01:00
parent c121bccb03
commit a9a26b93f9
1 changed files with 2 additions and 7 deletions

View File

@ -534,6 +534,7 @@ static DynGenFunc* _DynGen_EnterRecompiledCode()
static DynGenFunc* _DynGen_DispatchBlockDiscard() static DynGenFunc* _DynGen_DispatchBlockDiscard()
{ {
u8* retval = xGetPtr(); u8* retval = xGetPtr();
xEMMS();
xCALL(dyna_block_discard); xCALL(dyna_block_discard);
xJMP(ExitRecompiledCode); xJMP(ExitRecompiledCode);
return (DynGenFunc*)retval; return (DynGenFunc*)retval;
@ -542,6 +543,7 @@ static DynGenFunc* _DynGen_DispatchBlockDiscard()
static DynGenFunc* _DynGen_DispatchPageReset() static DynGenFunc* _DynGen_DispatchPageReset()
{ {
u8* retval = xGetPtr(); u8* retval = xGetPtr();
xEMMS();
xCALL(dyna_page_reset); xCALL(dyna_page_reset);
xJMP(ExitRecompiledCode); xJMP(ExitRecompiledCode);
return (DynGenFunc*)retval; return (DynGenFunc*)retval;
@ -869,13 +871,6 @@ void R5900::Dynarec::OpcodeImpl::recBREAK()
// Size is in dwords (4 bytes) // Size is in dwords (4 bytes)
void recClear(u32 addr, u32 size) void recClear(u32 addr, u32 size)
{ {
// necessary since recompiler doesn't call femms/emms
#ifdef _MSC_VER
__asm emms;
#else
__asm__ __volatile__("emms");
#endif
if ((addr) >= maxrecmem || !(recLUT[(addr) >> 16] + (addr & ~0xFFFFUL))) if ((addr) >= maxrecmem || !(recLUT[(addr) >> 16] + (addr & ~0xFFFFUL)))
return; return;
addr = HWADDR(addr); addr = HWADDR(addr);