mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-06 22:48:25 +01:00
A64: Implement UQSHRN, UQRSHRN (vector)
This commit is contained in:
parent
8f4c1a8558
commit
f0fecf2615
2 changed files with 14 additions and 4 deletions
|
|
@ -109,8 +109,10 @@ bool ShiftRightNarrowing(TranslatorVisitor& v, bool Q, Imm<4> immh, Imm<3> immb,
|
|||
case Narrowing::Truncation:
|
||||
return v.ir.VectorNarrow(source_esize, wide_result);
|
||||
case Narrowing::SaturateToUnsigned:
|
||||
ASSERT(signedness == Signedness::Signed);
|
||||
return v.ir.VectorSignedSaturatedNarrowToUnsigned(source_esize, wide_result);
|
||||
if (signedness == Signedness::Signed) {
|
||||
return v.ir.VectorSignedSaturatedNarrowToUnsigned(source_esize, wide_result);
|
||||
}
|
||||
return v.ir.VectorUnsignedSaturatedNarrow(source_esize, wide_result);
|
||||
case Narrowing::SaturateToSigned:
|
||||
ASSERT(signedness == Signedness::Signed);
|
||||
return v.ir.VectorSignedSaturatedNarrowToSigned(source_esize, wide_result);
|
||||
|
|
@ -212,6 +214,14 @@ bool TranslatorVisitor::SQRSHRUN_2(bool Q, Imm<4> immh, Imm<3> immb, Vec Vn, Vec
|
|||
return ShiftRightNarrowing(*this, Q, immh, immb, Vn, Vd, Rounding::Round, Narrowing::SaturateToUnsigned, Signedness::Signed);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::UQSHRN_2(bool Q, Imm<4> immh, Imm<3> immb, Vec Vn, Vec Vd) {
|
||||
return ShiftRightNarrowing(*this, Q, immh, immb, Vn, Vd, Rounding::None, Narrowing::SaturateToUnsigned, Signedness::Unsigned);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::UQRSHRN_2(bool Q, Imm<4> immh, Imm<3> immb, Vec Vn, Vec Vd) {
|
||||
return ShiftRightNarrowing(*this, Q, immh, immb, Vn, Vd, Rounding::Round, Narrowing::SaturateToUnsigned, Signedness::Unsigned);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SSHLL(bool Q, Imm<4> immh, Imm<3> immb, Vec Vn, Vec Vd) {
|
||||
return ShiftLeftLong(*this, Q, immh, immb, Vn, Vd, Signedness::Signed);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue