Implement prefetch_write() and prefetch_exec() wrappers

Do some refactoring to prefetch_read() in util/asm.hpp as well.
Make all these function constexpr because they are no-ops.
This commit is contained in:
Nekotekina 2020-11-24 08:18:31 +03:00
parent 5076da8f77
commit 43952e18e2
6 changed files with 57 additions and 23 deletions

View file

@ -64,6 +64,7 @@
#include <thread>
#include <cfenv>
#include <cctype>
#include "util/asm.hpp"
#include "util/vm.hpp"
const bool s_use_ssse3 = utils::has_ssse3();
@ -1749,8 +1750,8 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
return false;
}
_m_prefetchw(ppu.rdata);
_m_prefetchw(ppu.rdata + 64);
utils::prefetch_read(ppu.rdata);
utils::prefetch_read(ppu.rdata + 64);
ppu.last_faddr = addr;
ppu.last_ftime = res.load() & -128;
ppu.last_ftsc = __rdtsc();