mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-12 12:03:56 +00:00
IR: Implement FPRoundInt
This commit is contained in:
@@ -1449,6 +1449,13 @@ U32U64 IREmitter::FPNeg(const U32U64& a) {
|
||||
}
|
||||
}
|
||||
|
||||
U32U64 IREmitter::FPRoundInt(const U32U64& a, FP::RoundingMode rounding, bool exact) {
|
||||
if (a.GetType() == Type::U32) {
|
||||
return Inst<U32>(Opcode::FPRoundInt32, a, static_cast<u8>(rounding), Imm1(exact));
|
||||
}
|
||||
return Inst<U64>(Opcode::FPRoundInt64, a, static_cast<u8>(rounding), Imm1(exact));
|
||||
}
|
||||
|
||||
U32U64 IREmitter::FPSqrt(const U32U64& a) {
|
||||
if (a.GetType() == Type::U32) {
|
||||
return Inst<U32>(Opcode::FPSqrt32, a);
|
||||
|
||||
@@ -266,6 +266,7 @@ public:
|
||||
U32U64 FPMul(const U32U64& a, const U32U64& b, bool fpscr_controlled);
|
||||
U32U64 FPMulAdd(const U32U64& a, const U32U64& b, const U32U64& c, bool fpscr_controlled);
|
||||
U32U64 FPNeg(const U32U64& a);
|
||||
U32U64 FPRoundInt(const U32U64& a, FP::RoundingMode rounding, bool exact);
|
||||
U32U64 FPSqrt(const U32U64& a);
|
||||
U32U64 FPSub(const U32U64& a, const U32U64& b, bool fpscr_controlled);
|
||||
U32 FPDoubleToSingle(const U64& a, bool fpscr_controlled);
|
||||
|
||||
@@ -384,6 +384,8 @@ OPCODE(FPMulAdd32, T::U32, T::U32, T::U
|
||||
OPCODE(FPMulAdd64, T::U64, T::U64, T::U64, T::U64 )
|
||||
OPCODE(FPNeg32, T::U32, T::U32 )
|
||||
OPCODE(FPNeg64, T::U64, T::U64 )
|
||||
OPCODE(FPRoundInt32, T::U32, T::U32, T::U8, T::U1 )
|
||||
OPCODE(FPRoundInt64, T::U64, T::U64, T::U8, T::U1 )
|
||||
OPCODE(FPSqrt32, T::U32, T::U32 )
|
||||
OPCODE(FPSqrt64, T::U64, T::U64 )
|
||||
OPCODE(FPSub32, T::U32, T::U32, T::U32 )
|
||||
|
||||
Reference in New Issue
Block a user