A64: Implement PMULL{2}

This commit is contained in:
Lioncash 2018-07-26 12:24:47 -04:00 committed by MerryMage
parent 5ebf496d4e
commit 7fdd8b0197
6 changed files with 64 additions and 5 deletions

View file

@ -1198,6 +1198,18 @@ U128 IREmitter::VectorPolynomialMultiply(const U128& a, const U128& b) {
return Inst<U128>(Opcode::VectorPolynomialMultiply8, a, b);
}
U128 IREmitter::VectorPolynomialMultiplyLong(size_t esize, const U128& a, const U128& b) {
switch (esize) {
case 8:
return Inst<U128>(Opcode::VectorPolynomialMultiplyLong8, a, b);
case 64:
return Inst<U128>(Opcode::VectorPolynomialMultiplyLong64, a, b);
default:
UNREACHABLE();
return {};
}
}
U128 IREmitter::VectorPopulationCount(const U128& a) {
return Inst<U128>(Opcode::VectorPopulationCount, a);
}

View file

@ -239,6 +239,7 @@ public:
U128 VectorPairedAddSignedWiden(size_t original_esize, const U128& a);
U128 VectorPairedAddUnsignedWiden(size_t original_esize, const U128& a);
U128 VectorPolynomialMultiply(const U128& a, const U128& b);
U128 VectorPolynomialMultiplyLong(size_t esize, const U128& a, const U128& b);
U128 VectorPopulationCount(const U128& a);
U128 VectorReverseBits(const U128& a);
U128 VectorRotateLeft(size_t esize, const U128& a, u8 amount);

View file

@ -331,6 +331,8 @@ OPCODE(VectorPairedAdd16, T::U128, T::U128,
OPCODE(VectorPairedAdd32, T::U128, T::U128, T::U128 )
OPCODE(VectorPairedAdd64, T::U128, T::U128, T::U128 )
OPCODE(VectorPolynomialMultiply8, T::U128, T::U128, T::U128 )
OPCODE(VectorPolynomialMultiplyLong8, T::U128, T::U128, T::U128 )
OPCODE(VectorPolynomialMultiplyLong64, T::U128, T::U128, T::U128 )
OPCODE(VectorPopulationCount, T::U128, T::U128 )
OPCODE(VectorReverseBits, T::U128, T::U128 )
OPCODE(VectorRoundingHalvingAddS8, T::U128, T::U128, T::U128 )