backend/rv64: Implement GetCFlagFromNZCV
This commit is contained in:
parent
483dcba9b6
commit
6142db8647
1 changed files with 9 additions and 2 deletions
|
@ -93,8 +93,15 @@ void EmitIR<IR::Opcode::GetLowerFromOp>(biscuit::Assembler&, EmitContext&, IR::I
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::GetCFlagFromNZCV>(biscuit::Assembler&, EmitContext&, IR::Inst*) {
|
void EmitIR<IR::Opcode::GetCFlagFromNZCV>(biscuit::Assembler& as, EmitContext& ctx, IR::Inst* inst) {
|
||||||
UNIMPLEMENTED();
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
|
|
||||||
|
auto Xc = ctx.reg_alloc.WriteX(inst);
|
||||||
|
auto Xnzcv = ctx.reg_alloc.ReadX(args[0]);
|
||||||
|
RegAlloc::Realize(Xc, Xnzcv);
|
||||||
|
|
||||||
|
as.LUI(Xscratch0, 0x20000);
|
||||||
|
as.AND(Xc, Xnzcv, Xscratch0);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|
Loading…
Reference in a new issue