emit_arm64_a32: Implement A32SetGEFlagsCompressed

This commit is contained in:
Merry 2022-07-30 19:11:05 +01:00 committed by merry
parent 735f5b787a
commit 22d87bcbe5

View file

@ -380,10 +380,17 @@ void EmitIR<IR::Opcode::A32SetGEFlags>(oaknut::CodeGenerator& code, EmitContext&
template<> template<>
void EmitIR<IR::Opcode::A32SetGEFlagsCompressed>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) { void EmitIR<IR::Opcode::A32SetGEFlagsCompressed>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
(void)code; auto args = ctx.reg_alloc.GetArgumentInfo(inst);
(void)ctx; auto Wge = ctx.reg_alloc.ReadW(args[0]);
(void)inst; RegAlloc::Realize(Wge);
ASSERT_FALSE("Unimplemented");
code.LSR(Wscratch0, Wge, 16);
code.MOV(Wscratch1, 0x00204081);
code.MUL(Wscratch0, Wscratch0, Wscratch1);
code.AND(Wscratch0, Wscratch0, 0x01010101);
code.LSL(Wscratch1, Wscratch0, 8);
code.SUB(Wscratch0, Wscratch1, Wscratch0);
code.STR(Wscratch0, Xstate, offsetof(A32JitState, cpsr_ge));
} }
template<> template<>