backend/arm64: Implement A32SetCpsrNZ

This commit is contained in:
Merry 2022-07-24 16:12:53 +01:00 committed by merry
parent 7056913b6b
commit 129af4f6b4

View file

@ -263,10 +263,17 @@ void EmitIR<IR::Opcode::A32SetCpsrNZCVQ>(oaknut::CodeGenerator& code, EmitContex
template<> template<>
void EmitIR<IR::Opcode::A32SetCpsrNZ>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) { void EmitIR<IR::Opcode::A32SetCpsrNZ>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
(void)code; auto args = ctx.reg_alloc.GetArgumentInfo(inst);
(void)ctx;
(void)inst; auto Wnz = ctx.reg_alloc.ReadW(args[0]);
ASSERT_FALSE("Unimplemented"); RegAlloc::Realize(Wnz);
// TODO: Track latent value
code.LDR(Wscratch0, Xstate, offsetof(A32JitState, cpsr_nzcv));
code.AND(Wscratch0, Wscratch0, 0x30000000);
code.ORR(Wscratch0, Wscratch0, Wnz);
code.STR(Wscratch0, Xstate, offsetof(A32JitState, cpsr_nzcv));
} }
template<> template<>