mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
- Renamed ARM9 to ARMv7.
- Improved ELF32 loader.
This commit is contained in:
parent
6b22e7d90a
commit
b263c3ebaf
22 changed files with 149 additions and 144 deletions
|
@ -18,6 +18,7 @@ CPUThread::CPUThread(CPUThreadType type)
|
|||
, m_free_data(false)
|
||||
, m_dec(nullptr)
|
||||
, m_is_step(false)
|
||||
, m_is_branch(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -45,6 +46,7 @@ void CPUThread::Reset()
|
|||
|
||||
SetPc(0);
|
||||
cycle = 0;
|
||||
m_is_branch = false;
|
||||
|
||||
m_status = Stopped;
|
||||
m_error = 0;
|
||||
|
@ -124,9 +126,18 @@ void CPUThread::SetEntry(const u64 pc)
|
|||
entry = pc;
|
||||
}
|
||||
|
||||
void CPUThread::NextPc()
|
||||
void CPUThread::NextPc(u8 instr_size)
|
||||
{
|
||||
SetPc(nPC);
|
||||
if(m_is_branch)
|
||||
{
|
||||
m_is_branch = false;
|
||||
|
||||
SetPc(nPC);
|
||||
}
|
||||
else
|
||||
{
|
||||
PC += instr_size;
|
||||
}
|
||||
}
|
||||
|
||||
void CPUThread::SetBranch(const u64 pc)
|
||||
|
@ -137,9 +148,15 @@ void CPUThread::SetBranch(const u64 pc)
|
|||
Emu.Pause();
|
||||
}
|
||||
|
||||
m_is_branch = true;
|
||||
nPC = pc;
|
||||
}
|
||||
|
||||
void CPUThread::SetPc(const u64 pc)
|
||||
{
|
||||
PC = pc;
|
||||
}
|
||||
|
||||
void CPUThread::SetError(const u32 error)
|
||||
{
|
||||
if(error == 0)
|
||||
|
@ -279,8 +296,7 @@ void CPUThread::Task()
|
|||
continue;
|
||||
}
|
||||
|
||||
m_dec->DecodeMemory(PC + m_offset);
|
||||
NextPc();
|
||||
NextPc(m_dec->DecodeMemory(PC + m_offset));
|
||||
|
||||
if(status == CPUThread_Step)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue