Optimizations (#1680)

* Optimizations

1) Some headers simplified for better compilation time
2) Some templates simplified for smaller executable size
3) Eliminate std::future to fix compilation for mingw64
4) PKG installation can be cancelled now
5) cellGame fixes
6) XAudio2 fix for mingw64
7) PPUInterpreter bug fixed (Clang)

* any_pod<> implemented

Aliases: any16, any32, any64
rsx::make_command fixed
This commit is contained in:
Ivan 2016-04-25 13:49:12 +03:00
parent 75fe95eeb1
commit da7472fe81
96 changed files with 2086 additions and 1772 deletions

View file

@ -108,15 +108,15 @@ void PPUThread::cpu_task()
while (true)
{
if (_pc == PC && !state.load())
if (LIKELY(_pc == PC && !state.load()))
{
func0(*this, { op0 });
if ((_pc += 4) == (PC += 4) && !state.load())
if (LIKELY((_pc += 4) == (PC += 4) && !state.load()))
{
func1(*this, { op1 });
if ((_pc += 4) == (PC += 4))
if (LIKELY((_pc += 4) == (PC += 4)))
{
op0 = op2;
func0 = func2;
@ -135,7 +135,7 @@ void PPUThread::cpu_task()
func1 = table[ppu_decode(op1 = ops[1])];
func2 = table[ppu_decode(op2 = ops[2])];
if (check_status()) return;
if (UNLIKELY(check_status())) return;
}
}
@ -152,6 +152,11 @@ PPUThread::~PPUThread()
}
}
PPUThread::PPUThread(const std::string& name)
: cpu_thread(cpu_type::ppu, name)
{
}
be_t<u64>* PPUThread::get_stack_arg(s32 i, u64 align)
{
if (align != 1 && align != 2 && align != 4 && align != 8 && align != 16) throw fmt::exception("Unsupported alignment: 0x%llx" HERE, align);