mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 09:48:37 +12:00
atomic.hpp: add some features and optimizations
Add atomic_t<>::observe() (relaxed load) Add atomic_fence_XXX() (barrier functions) Get rid of MFENCE instruction, replace with no-op LOCK OR on stack. Remove <atomic> dependence from stdafx.h and relevant headers.
This commit is contained in:
parent
77aa9e58f2
commit
b16cc618b5
14 changed files with 171 additions and 60 deletions
|
@ -3156,7 +3156,7 @@ bool ppu_interpreter::CRANDC(ppu_thread& ppu, ppu_opcode_t op)
|
|||
|
||||
bool ppu_interpreter::ISYNC(ppu_thread& ppu, ppu_opcode_t op)
|
||||
{
|
||||
std::atomic_thread_fence(std::memory_order_acquire);
|
||||
atomic_fence_acquire();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -4222,7 +4222,7 @@ bool ppu_interpreter::LFSUX(ppu_thread& ppu, ppu_opcode_t op)
|
|||
|
||||
bool ppu_interpreter::SYNC(ppu_thread& ppu, ppu_opcode_t op)
|
||||
{
|
||||
std::atomic_thread_fence(std::memory_order_seq_cst);
|
||||
atomic_fence_seq_cst();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -4432,7 +4432,7 @@ bool ppu_interpreter::SRADI(ppu_thread& ppu, ppu_opcode_t op)
|
|||
|
||||
bool ppu_interpreter::EIEIO(ppu_thread& ppu, ppu_opcode_t op)
|
||||
{
|
||||
std::atomic_thread_fence(std::memory_order_seq_cst);
|
||||
atomic_fence_seq_cst();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue