mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-04 13:44:31 +01:00
IR: Implement Vector{Max,Min}{Signed,Unsigned}
This commit is contained in:
parent
adb7f5f86f
commit
47c0ad0fc8
4 changed files with 195 additions and 0 deletions
|
|
@ -932,6 +932,66 @@ U128 IREmitter::VectorLogicalShiftRight(size_t esize, const U128& a, u8 shift_am
|
|||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorMaxSigned(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return Inst<U128>(Opcode::VectorMaxS8, a, b);
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::VectorMaxS16, a, b);
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::VectorMaxS32, a, b);
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::VectorMaxS64, a, b);
|
||||
}
|
||||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorMaxUnsigned(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return Inst<U128>(Opcode::VectorMaxU8, a, b);
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::VectorMaxU16, a, b);
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::VectorMaxU32, a, b);
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::VectorMaxU64, a, b);
|
||||
}
|
||||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorMinSigned(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return Inst<U128>(Opcode::VectorMinS8, a, b);
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::VectorMinS16, a, b);
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::VectorMinS32, a, b);
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::VectorMinS64, a, b);
|
||||
}
|
||||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorMinUnsigned(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return Inst<U128>(Opcode::VectorMinU8, a, b);
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::VectorMinU16, a, b);
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::VectorMinU32, a, b);
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::VectorMinU64, a, b);
|
||||
}
|
||||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorMultiply(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
|
|
|
|||
|
|
@ -219,6 +219,10 @@ public:
|
|||
U128 VectorInterleaveLower(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorLogicalShiftLeft(size_t esize, const U128& a, u8 shift_amount);
|
||||
U128 VectorLogicalShiftRight(size_t esize, const U128& a, u8 shift_amount);
|
||||
U128 VectorMaxSigned(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorMaxUnsigned(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorMinSigned(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorMinUnsigned(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorMultiply(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorNarrow(size_t original_esize, const U128& a);
|
||||
U128 VectorNot(const U128& a);
|
||||
|
|
|
|||
|
|
@ -242,6 +242,22 @@ OPCODE(VectorLogicalShiftRight8, T::U128, T::U128, T::U8
|
|||
OPCODE(VectorLogicalShiftRight16, T::U128, T::U128, T::U8 )
|
||||
OPCODE(VectorLogicalShiftRight32, T::U128, T::U128, T::U8 )
|
||||
OPCODE(VectorLogicalShiftRight64, T::U128, T::U128, T::U8 )
|
||||
OPCODE(VectorMaxS8, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxS16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxS32, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxS64, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxU8, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxU16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxU32, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxU64, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMinS8, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMinS16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMinS32, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMinS64, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMinU8, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMinU16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMinU32, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMinU64, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMultiply8, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMultiply16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMultiply32, T::U128, T::U128, T::U128 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue