mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-08 07:28:09 +01:00
IR: Implement FPMulAdd
This commit is contained in:
parent
24e3299276
commit
8c90fcf58e
7 changed files with 207 additions and 1 deletions
|
|
@ -1405,6 +1405,16 @@ U32U64 IREmitter::FPMul(const U32U64& a, const U32U64& b, bool fpscr_controlled)
|
|||
}
|
||||
}
|
||||
|
||||
U32U64 IREmitter::FPMulAdd(const U32U64& a, const U32U64& b, const U32U64& c, bool fpscr_controlled) {
|
||||
ASSERT(fpscr_controlled);
|
||||
ASSERT(a.GetType() == b.GetType());
|
||||
if (a.GetType() == Type::U32) {
|
||||
return Inst<U32>(Opcode::FPMulAdd32, a, b, c);
|
||||
} else {
|
||||
return Inst<U64>(Opcode::FPMulAdd64, a, b, c);
|
||||
}
|
||||
}
|
||||
|
||||
U32U64 IREmitter::FPNeg(const U32U64& a) {
|
||||
if (a.GetType() == Type::U32) {
|
||||
return Inst<U32>(Opcode::FPNeg32, a);
|
||||
|
|
|
|||
|
|
@ -258,6 +258,7 @@ public:
|
|||
U32U64 FPMin(const U32U64& a, const U32U64& b, bool fpscr_controlled);
|
||||
U32U64 FPMinNumeric(const U32U64& a, const U32U64& b, bool fpscr_controlled);
|
||||
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 FPSqrt(const U32U64& a);
|
||||
U32U64 FPSub(const U32U64& a, const U32U64& b, bool fpscr_controlled);
|
||||
|
|
|
|||
|
|
@ -374,6 +374,8 @@ OPCODE(FPMinNumeric32, T::U32, T::U32, T::U
|
|||
OPCODE(FPMinNumeric64, T::U64, T::U64, T::U64 )
|
||||
OPCODE(FPMul32, T::U32, T::U32, T::U32 )
|
||||
OPCODE(FPMul64, T::U64, T::U64, T::U64 )
|
||||
OPCODE(FPMulAdd32, T::U32, T::U32, T::U32, T::U32 )
|
||||
OPCODE(FPMulAdd64, T::U64, T::U64, T::U64, T::U64 )
|
||||
OPCODE(FPNeg32, T::U32, T::U32 )
|
||||
OPCODE(FPNeg64, T::U64, T::U64 )
|
||||
OPCODE(FPSqrt32, T::U32, T::U32 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue