Fix GetCFlag
This commit is contained in:
parent
e02a999cad
commit
7791d3d854
1 changed files with 4 additions and 4 deletions
|
@ -142,10 +142,10 @@ void EmitIR<IR::Opcode::A64SetCheckBit>(oaknut::CodeGenerator& code, EmitContext
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::A64GetCFlag>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::A64GetCFlag>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
auto Wresult = ctx.reg_alloc.WriteW(inst);
|
auto Wflag = ctx.reg_alloc.WriteW(inst);
|
||||||
RegAlloc::Realize(Wresult);
|
RegAlloc::Realize(Wflag);
|
||||||
code.LDR(Wresult, Xstate, offsetof(A64JitState, cpsr_nzcv));
|
code.LDR(Wflag, Xstate, offsetof(A64JitState, cpsr_nzcv));
|
||||||
code.UBFX(Wresult, Wresult, nzcv_c_flag_shift, 1);
|
code.AND(Wflag, Wflag, 1 << nzcv_c_flag_shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|
Loading…
Reference in a new issue