IR: FPCompare{32,64} now return NZCV flags instead of implicitly setting them

This commit is contained in:
MerryMage 2018-02-05 12:16:01 +00:00
parent 2ee39d6b36
commit aac5af50e2
10 changed files with 51 additions and 26 deletions

View file

@ -907,13 +907,13 @@ U32U64 IREmitter::FPAdd(const U32U64& a, const U32U64& b, bool fpscr_controlled)
}
}
void IREmitter::FPCompare(const U32U64& a, const U32U64& b, bool exc_on_qnan, bool fpscr_controlled) {
NZCV IREmitter::FPCompare(const U32U64& a, const U32U64& b, bool exc_on_qnan, bool fpscr_controlled) {
ASSERT(fpscr_controlled);
ASSERT(a.GetType() == b.GetType());
if (a.GetType() == Type::U32) {
Inst(Opcode::FPCompare32, a, b, Imm1(exc_on_qnan));
return Inst<NZCV>(Opcode::FPCompare32, a, b, Imm1(exc_on_qnan));
} else {
Inst(Opcode::FPCompare64, a, b, Imm1(exc_on_qnan));
return Inst<NZCV>(Opcode::FPCompare64, a, b, Imm1(exc_on_qnan));
}
}