mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
ARMv7: ARM encoding introduced; bugfixes
This commit is contained in:
parent
dab80497bb
commit
23c7028b2a
16 changed files with 161 additions and 109 deletions
|
@ -12,7 +12,8 @@
|
|||
|
||||
void ARMv7Context::write_pc(u32 value)
|
||||
{
|
||||
thread.SetBranch(value);
|
||||
ISET = value & 1 ? Thumb : ARM;
|
||||
thread.SetBranch(value & ~1);
|
||||
}
|
||||
|
||||
u32 ARMv7Context::read_pc()
|
||||
|
@ -109,10 +110,11 @@ ARMv7Thread::~ARMv7Thread()
|
|||
|
||||
void ARMv7Thread::InitRegs()
|
||||
{
|
||||
memset(context.GPR, 0, sizeof(context.GPR[0]) * 15);
|
||||
memset(context.GPR, 0, sizeof(context.GPR));
|
||||
context.APSR.APSR = 0;
|
||||
context.IPSR.IPSR = 0;
|
||||
//context.ISET = Thumb;
|
||||
context.ISET = PC & 1 ? Thumb : ARM; // select instruction set
|
||||
context.thread.SetPc(PC & ~1); // and fix PC
|
||||
context.ITSTATE.IT = 0;
|
||||
context.SP = m_stack_addr + m_stack_size;
|
||||
context.TLS = armv7_get_tls(GetId());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue