mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-08 08:52:56 +00:00
A64: Implement USHL
This commit is contained in:
@@ -748,7 +748,7 @@ INST(ORN_asimd, "ORN (vector)", "0Q001
|
||||
//INST(UQSUB_2, "UQSUB", "0Q101110zz1mmmmm001011nnnnnddddd")
|
||||
INST(CMHI_2, "CMHI (register)", "0Q101110zz1mmmmm001101nnnnnddddd")
|
||||
INST(CMHS_2, "CMHS (register)", "0Q101110zz1mmmmm001111nnnnnddddd")
|
||||
//INST(USHL_2, "USHL", "0Q101110zz1mmmmm010001nnnnnddddd")
|
||||
INST(USHL_2, "USHL", "0Q101110zz1mmmmm010001nnnnnddddd")
|
||||
//INST(UQSHL_reg_2, "UQSHL (register)", "0Q101110zz1mmmmm010011nnnnnddddd")
|
||||
//INST(URSHL_2, "URSHL", "0Q101110zz1mmmmm010101nnnnnddddd")
|
||||
//INST(UQRSHL_2, "UQRSHL", "0Q101110zz1mmmmm010111nnnnnddddd")
|
||||
|
||||
@@ -199,6 +199,20 @@ bool TranslatorVisitor::CMHS_2(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::USHL_2(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
if (size == 0b11 && !Q) {
|
||||
return ReservedValue();
|
||||
}
|
||||
const size_t esize = 8 << size.ZeroExtend<size_t>();
|
||||
const size_t datasize = Q ? 128 : 64;
|
||||
|
||||
const IR::U128 operand1 = V(datasize, Vn);
|
||||
const IR::U128 operand2 = V(datasize, Vm);
|
||||
const IR::U128 result = ir.VectorLogicalVShift(esize, operand1, operand2);
|
||||
V(datasize, Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::UMAX(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
if (size == 0b11) {
|
||||
return ReservedValue();
|
||||
|
||||
@@ -960,6 +960,21 @@ U128 IREmitter::VectorLogicalShiftRight(size_t esize, const U128& a, u8 shift_am
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorLogicalVShift(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return Inst<U128>(Opcode::VectorLogicalVShift8, a, b);
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::VectorLogicalVShift16, a, b);
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::VectorLogicalVShift32, a, b);
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::VectorLogicalVShift64, a, b);
|
||||
}
|
||||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorMaxSigned(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
|
||||
@@ -226,6 +226,7 @@ public:
|
||||
U128 VectorLessUnsigned(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 VectorLogicalVShift(size_t esize, const U128& a, const U128& b);
|
||||
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);
|
||||
|
||||
@@ -250,6 +250,10 @@ 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(VectorLogicalVShift8, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorLogicalVShift16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorLogicalVShift32, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorLogicalVShift64, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxS8, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxS16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorMaxS32, T::U128, T::U128, T::U128 )
|
||||
|
||||
Reference in New Issue
Block a user