arm64/a32_jitstate: Adjust structure

This commit is contained in:
Merry 2022-07-30 19:09:59 +01:00 committed by merry
parent 726e116e28
commit 950400fb6b
2 changed files with 5 additions and 5 deletions

View file

@ -16,9 +16,9 @@ namespace Dynarmic::Backend::Arm64 {
struct A32JitState { struct A32JitState {
u32 cpsr_nzcv = 0; u32 cpsr_nzcv = 0;
u32 cpsr_ge = 0;
u32 cpsr_jaifm = 0;
u32 cpsr_q = 0; u32 cpsr_q = 0;
u32 cpsr_jaifm = 0;
u32 cpsr_ge = 0;
std::array<u32, 16> regs{}; std::array<u32, 16> regs{};

View file

@ -224,10 +224,10 @@ void EmitIR<IR::Opcode::A32GetCpsr>(oaknut::CodeGenerator& code, EmitContext& ct
auto Wcpsr = ctx.reg_alloc.WriteW(inst); auto Wcpsr = ctx.reg_alloc.WriteW(inst);
RegAlloc::Realize(Wcpsr); RegAlloc::Realize(Wcpsr);
static_assert(offsetof(A32JitState, cpsr_jaifm) + sizeof(u32) == offsetof(A32JitState, cpsr_q)); static_assert(offsetof(A32JitState, cpsr_nzcv) + sizeof(u32) == offsetof(A32JitState, cpsr_q));
code.LDR(Wcpsr, Xstate, offsetof(A32JitState, cpsr_nzcv)); code.LDP(Wscratch0, Wscratch1, Xstate, offsetof(A32JitState, cpsr_nzcv));
code.LDP(Wscratch0, Wscratch1, Xstate, offsetof(A32JitState, cpsr_jaifm)); code.LDR(Wcpsr, Xstate, offsetof(A32JitState, cpsr_jaifm));
code.ORR(Wcpsr, Wcpsr, Wscratch0); code.ORR(Wcpsr, Wcpsr, Wscratch0);
code.ORR(Wcpsr, Wcpsr, Wscratch1); code.ORR(Wcpsr, Wcpsr, Wscratch1);