mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-06 06:28:13 +01:00
ir: Add opcodes for performing rounding halving adds
This commit is contained in:
parent
054549da35
commit
bc718c5b28
4 changed files with 135 additions and 0 deletions
|
|
@ -1198,6 +1198,34 @@ U128 IREmitter::VectorRotateRight(size_t esize, const U128& a, u8 amount) {
|
|||
VectorLogicalShiftLeft(esize, a, static_cast<u8>(esize - amount)));
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorRoundingHalvingAddSigned(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return Inst<U128>(Opcode::VectorRoundingHalvingAddS8, a, b);
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::VectorRoundingHalvingAddS16, a, b);
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::VectorRoundingHalvingAddS32, a, b);
|
||||
}
|
||||
|
||||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorRoundingHalvingAddUnsigned(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return Inst<U128>(Opcode::VectorRoundingHalvingAddU8, a, b);
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::VectorRoundingHalvingAddU16, a, b);
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::VectorRoundingHalvingAddU32, a, b);
|
||||
}
|
||||
|
||||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorShuffleHighHalfwords(const U128& a, u8 mask) {
|
||||
return Inst<U128>(Opcode::VectorShuffleHighHalfwords, a, mask);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,6 +236,8 @@ public:
|
|||
U128 VectorReverseBits(const U128& a);
|
||||
U128 VectorRotateLeft(size_t esize, const U128& a, u8 amount);
|
||||
U128 VectorRotateRight(size_t esize, const U128& a, u8 amount);
|
||||
U128 VectorRoundingHalvingAddSigned(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorRoundingHalvingAddUnsigned(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorShuffleHighHalfwords(const U128& a, u8 mask);
|
||||
U128 VectorShuffleLowHalfwords(const U128& a, u8 mask);
|
||||
U128 VectorShuffleWords(const U128& a, u8 mask);
|
||||
|
|
|
|||
|
|
@ -325,6 +325,12 @@ OPCODE(VectorPairedAdd32, T::U128, T::U128, T::U
|
|||
OPCODE(VectorPairedAdd64, 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 )
|
||||
OPCODE(VectorRoundingHalvingAddS16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorRoundingHalvingAddS32, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorRoundingHalvingAddU8, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorRoundingHalvingAddU16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorRoundingHalvingAddU32, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorShuffleHighHalfwords, T::U128, T::U128, T::U8 )
|
||||
OPCODE(VectorShuffleLowHalfwords, T::U128, T::U128, T::U8 )
|
||||
OPCODE(VectorShuffleWords, T::U128, T::U128, T::U8 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue