mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-03 01:42:57 +00:00
IR: Implement VectorTranspose
This commit is contained in:
@@ -1761,6 +1761,20 @@ U128 IREmitter::VectorTableLookup(const U128& defaults, const Table& table, cons
|
||||
return Inst<U128>(Opcode::VectorTableLookup128, defaults, table, indices);
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorTranspose(size_t esize, const U128& a, const U128& b, bool part) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return Inst<U128>(Opcode::VectorTranspose8, a, b, Imm1(part));
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::VectorTranspose16, a, b, Imm1(part));
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::VectorTranspose32, a, b, Imm1(part));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::VectorTranspose64, a, b, Imm1(part));
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorUnsignedAbsoluteDifference(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
|
||||
@@ -301,6 +301,7 @@ public:
|
||||
Table VectorTable(std::vector<U128> values);
|
||||
U64 VectorTableLookup(const U64& defaults, const Table& table, const U64& indices);
|
||||
U128 VectorTableLookup(const U128& defaults, const Table& table, const U128& indices);
|
||||
U128 VectorTranspose(size_t esize, const U128& a, const U128& b, bool part);
|
||||
U128 VectorUnsignedAbsoluteDifference(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorUnsignedRecipEstimate(const U128& a);
|
||||
U128 VectorUnsignedRecipSqrtEstimate(const U128& a);
|
||||
|
||||
@@ -473,6 +473,10 @@ OPCODE(VectorSub64, U128, U128
|
||||
OPCODE(VectorTable, Table, Opaque, Opaque, Opaque, Opaque )
|
||||
OPCODE(VectorTableLookup64, U64, U64, Table, U64 )
|
||||
OPCODE(VectorTableLookup128, U128, U128, Table, U128 )
|
||||
OPCODE(VectorTranspose8, U128, U128, U128, U1 )
|
||||
OPCODE(VectorTranspose16, U128, U128, U128, U1 )
|
||||
OPCODE(VectorTranspose32, U128, U128, U128, U1 )
|
||||
OPCODE(VectorTranspose64, U128, U128, U128, U1 )
|
||||
OPCODE(VectorUnsignedAbsoluteDifference8, U128, U128, U128 )
|
||||
OPCODE(VectorUnsignedAbsoluteDifference16, U128, U128, U128 )
|
||||
OPCODE(VectorUnsignedAbsoluteDifference32, U128, U128, U128 )
|
||||
|
||||
Reference in New Issue
Block a user