Exemplo n.º 1
0
u64 PPUThread::FastCall2(u32 addr, u32 rtoc)
{
	auto old_status = m_status;
	auto old_PC = PC;
	auto old_stack = GPR[1]; // only saved and restored (may be wrong)
	auto old_rtoc = GPR[2];
	auto old_LR = LR;
	auto old_thread = GetCurrentNamedThread();

	m_status = Running;
	PC = addr;
	GPR[2] = rtoc;
	LR = Emu.m_ppu_thr_stop;
	SetCurrentNamedThread(this);

	Task();

	m_status = old_status;
	PC = old_PC;
	GPR[1] = old_stack;
	GPR[2] = old_rtoc;
	LR = old_LR;
	SetCurrentNamedThread(old_thread);

	return GPR[3];
}
Exemplo n.º 2
0
void ARMv7Thread::FastCall(u32 addr)
{
	auto old_status = m_status;
	auto old_PC = PC;
	auto old_stack = SP;
	auto old_LR = LR;
	auto old_thread = GetCurrentNamedThread();

	m_status = Running;
	PC = addr;
	LR = Emu.GetCPUThreadStop();
	SetCurrentNamedThread(this);

	CPUThread::Task();

	m_status = old_status;
	PC = old_PC;
	SP = old_stack;
	LR = old_LR;
	SetCurrentNamedThread(old_thread);
}
Exemplo n.º 3
0
u64 PPUThread::FastCall2(u64 addr, u64 rtoc)
{
	auto old_status = m_status;
	auto old_PC = PC;
	auto old_rtoc = GPR[2];
	auto old_LR = LR;
	auto old_thread = GetCurrentNamedThread();

	m_status = Running;
	PC = addr;
	GPR[2] = rtoc;
	LR = Emu.m_ppu_thr_stop;
	SetCurrentNamedThread(this);

	Task();

	m_status = old_status;
	PC = old_PC;
	GPR[2] = old_rtoc;
	LR = old_LR;
	SetCurrentNamedThread(old_thread);

	return GPR[3];
}