IR: Implement FPVectorMulAdd

This commit is contained in:
MerryMage 2018-07-25 13:19:48 +01:00
parent 3218bb9890
commit 771a4fc20b
4 changed files with 207 additions and 31 deletions

View file

@ -1696,6 +1696,17 @@ U128 IREmitter::FPVectorMul(size_t esize, const U128& a, const U128& b) {
return {};
}
U128 IREmitter::FPVectorMulAdd(size_t esize, const U128& a, const U128& b, const U128& c) {
switch (esize) {
case 32:
return Inst<U128>(Opcode::FPVectorMulAdd32, a, b, c);
case 64:
return Inst<U128>(Opcode::FPVectorMulAdd64, a, b, c);
}
UNREACHABLE();
return {};
}
U128 IREmitter::FPVectorPairedAdd(size_t esize, const U128& a, const U128& b) {
switch (esize) {
case 32:

View file

@ -267,7 +267,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 FPMulAdd(const U32U64& addend, const U32U64& op1, const U32U64& op2, bool fpscr_controlled);
U32U64 FPNeg(const U32U64& a);
U32U64 FPRoundInt(const U32U64& a, FP::RoundingMode rounding, bool exact);
U32U64 FPRSqrtEstimate(const U32U64& a);
@ -300,6 +300,7 @@ public:
U128 FPVectorGreater(size_t esize, const U128& a, const U128& b);
U128 FPVectorGreaterEqual(size_t esize, const U128& a, const U128& b);
U128 FPVectorMul(size_t esize, const U128& a, const U128& b);
U128 FPVectorMulAdd(size_t esize, const U128& addend, const U128& op1, const U128& op2);
U128 FPVectorPairedAdd(size_t esize, const U128& a, const U128& b);
U128 FPVectorPairedAddLower(size_t esize, const U128& a, const U128& b);
U128 FPVectorRSqrtEstimate(size_t esize, const U128& a);

View file

@ -441,6 +441,8 @@ OPCODE(FPVectorGreaterEqual32, T::U128, T::U128,
OPCODE(FPVectorGreaterEqual64, T::U128, T::U128, T::U128 )
OPCODE(FPVectorMul32, T::U128, T::U128, T::U128 )
OPCODE(FPVectorMul64, T::U128, T::U128, T::U128 )
OPCODE(FPVectorMulAdd32, T::U128, T::U128, T::U128, T::U128 )
OPCODE(FPVectorMulAdd64, T::U128, T::U128, T::U128, T::U128 )
OPCODE(FPVectorPairedAddLower32, T::U128, T::U128, T::U128 )
OPCODE(FPVectorPairedAddLower64, T::U128, T::U128, T::U128 )
OPCODE(FPVectorPairedAdd32, T::U128, T::U128, T::U128 )