More fixes as per PR feedback.
This commit is contained in:
parent
a6ecb3c913
commit
039fb95f80
|
@ -147,7 +147,7 @@ void ARM_DynCom::ExecuteInstructions(u64 num_instructions) {
|
|||
state->NumInstrsToExecute = num_instructions;
|
||||
unsigned ticks_executed = InterpreterMainLoop(state.get());
|
||||
CoreTiming::AddTicks(ticks_executed);
|
||||
state.get()->ServeBreak();
|
||||
state->ServeBreak();
|
||||
}
|
||||
|
||||
std::unique_ptr<ARM_Interface::ThreadContext> ARM_DynCom::NewContext() const {
|
||||
|
|
|
@ -597,16 +597,18 @@ void ARMul_State::WriteCP15Register(u32 value, u32 crn, u32 opcode_1, u32 crm, u
|
|||
}
|
||||
|
||||
void ARMul_State::ServeBreak() {
|
||||
if (GDBStub::IsServerEnabled()) {
|
||||
if (last_bkpt_hit) {
|
||||
Reg[15] = last_bkpt.address;
|
||||
}
|
||||
Kernel::Thread* thread = Kernel::GetCurrentThread();
|
||||
Core::CPU().SaveContext(thread->context);
|
||||
if (last_bkpt_hit || GDBStub::GetCpuStepFlag()) {
|
||||
last_bkpt_hit = false;
|
||||
GDBStub::Break();
|
||||
GDBStub::SendTrap(thread, 5);
|
||||
}
|
||||
if (!GDBStub::IsServerEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (last_bkpt_hit) {
|
||||
Reg[15] = last_bkpt.address;
|
||||
}
|
||||
Kernel::Thread* thread = Kernel::GetCurrentThread();
|
||||
Core::CPU().SaveContext(thread->context);
|
||||
if (last_bkpt_hit || GDBStub::GetCpuStepFlag()) {
|
||||
last_bkpt_hit = false;
|
||||
GDBStub::Break();
|
||||
GDBStub::SendTrap(thread, 5);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,8 +215,8 @@ static void FpuWrite(std::size_t id, u64 val, Kernel::Thread* thread = nullptr)
|
|||
}
|
||||
|
||||
if (id >= D0_REGISTER && id < FPSCR_REGISTER) {
|
||||
thread->context->SetFpuRegister(2 * (id - D0_REGISTER), (u32)val);
|
||||
thread->context->SetFpuRegister(2 * (id - D0_REGISTER) + 1, val >> 32);
|
||||
thread->context->SetFpuRegister(2 * (id - D0_REGISTER), static_cast<u32>(val));
|
||||
thread->context->SetFpuRegister(2 * (id - D0_REGISTER) + 1, static_cast<u32>(val >> 32));
|
||||
} else if (id == FPSCR_REGISTER) {
|
||||
return thread->context->SetFpscr(static_cast<u32>(val));
|
||||
}
|
||||
|
|
Reference in New Issue