mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-05 22:18:16 +01:00
IR: FPCompare{32,64} now return NZCV flags instead of implicitly setting them
This commit is contained in:
parent
2ee39d6b36
commit
aac5af50e2
10 changed files with 51 additions and 26 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ public:
|
|||
|
||||
U32U64 FPAbs(const U32U64& a);
|
||||
U32U64 FPAdd(const U32U64& a, const U32U64& b, bool fpscr_controlled);
|
||||
void FPCompare(const U32U64& a, const U32U64& b, bool exc_on_qnan, bool fpscr_controlled);
|
||||
NZCV FPCompare(const U32U64& a, const U32U64& b, bool exc_on_qnan, bool fpscr_controlled);
|
||||
U32U64 FPDiv(const U32U64& a, const U32U64& b, bool fpscr_controlled);
|
||||
U32U64 FPMul(const U32U64& a, const U32U64& b, bool fpscr_controlled);
|
||||
U32U64 FPNeg(const U32U64& a);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ A32OPC(ExceptionRaised, T::Void, T::U32, T::U64
|
|||
A32OPC(GetFpscr, T::U32, )
|
||||
A32OPC(SetFpscr, T::Void, T::U32, )
|
||||
A32OPC(GetFpscrNZCV, T::U32, )
|
||||
A32OPC(SetFpscrNZCV, T::Void, T::U32, )
|
||||
A32OPC(SetFpscrNZCV, T::Void, T::NZCVFlags )
|
||||
|
||||
// A64 Context getters/setters
|
||||
A64OPC(SetCheckBit, T::Void, T::U1 )
|
||||
|
|
@ -230,8 +230,8 @@ OPCODE(FPAbs32, T::U32, T::U32
|
|||
OPCODE(FPAbs64, T::U64, T::U64 )
|
||||
OPCODE(FPAdd32, T::U32, T::U32, T::U32 )
|
||||
OPCODE(FPAdd64, T::U64, T::U64, T::U64 )
|
||||
OPCODE(FPCompare32, T::Void, T::U32, T::U32, T::U1 )
|
||||
OPCODE(FPCompare64, T::Void, T::U64, T::U64, T::U1 )
|
||||
OPCODE(FPCompare32, T::NZCVFlags, T::U32, T::U32, T::U1 )
|
||||
OPCODE(FPCompare64, T::NZCVFlags, T::U64, T::U64, T::U1 )
|
||||
OPCODE(FPDiv32, T::U32, T::U32, T::U32 )
|
||||
OPCODE(FPDiv64, T::U64, T::U64, T::U64 )
|
||||
OPCODE(FPMul32, T::U32, T::U32, T::U32 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue