Small fixes

This commit is contained in:
Macdu 2022-10-16 22:37:28 +02:00 committed by merry
parent 64a5ca7c2e
commit 79ff9401f3
2 changed files with 28 additions and 1 deletions

View file

@ -47,6 +47,33 @@ Context& Context::operator=(Context&& ctx) noexcept {
return *this;
}
std::array<std::uint32_t, 16>& Context::Regs() {
return impl->state.regs;
}
const std::array<std::uint32_t, 16>& Context::Regs() const {
return impl->state.regs;
}
std::array<std::uint32_t, 64>& Context::ExtRegs() {
return impl->state.ext_regs;
}
const std::array<std::uint32_t, 64>& Context::ExtRegs() const {
return impl->state.ext_regs;
}
std::uint32_t Context::Cpsr() const {
return impl->state.Cpsr();
}
void Context::SetCpsr(std::uint32_t value) {
impl->state.SetCpsr(value);
}
std::uint32_t Context::Fpscr() const {
return impl->state.Fpscr();
}
void Context::SetFpscr(std::uint32_t value) {
return impl->state.SetFpscr(value);
}
struct Jit::Impl final {
Impl(Jit* jit_interface, A32::UserConfig conf)
: jit_interface(jit_interface)

View file

@ -540,7 +540,7 @@ void EmitIR<IR::Opcode::A32ExceptionRaised>(oaknut::CodeGenerator& code, EmitCon
code.MOV(W1, args[0].GetImmediateU32());
code.MOV(W2, args[1].GetImmediateU32());
EmitRelocation(code, ctx, LinkTarget::CallSVC);
EmitRelocation(code, ctx, LinkTarget::ExceptionRaised);
if (ctx.conf.enable_cycle_counting) {
EmitRelocation(code, ctx, LinkTarget::GetTicksRemaining);