mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-26 08:08:43 +00:00
A64: Implement SQSHL (register)'s scalar variant
We can implement this in terms of the vector variant.
This commit is contained in:
@@ -320,6 +320,17 @@ bool TranslatorVisitor::FCMGT_reg_2(bool sz, Vec Vm, Vec Vn, Vec Vd) {
|
||||
return ScalarFPCompareRegister(*this, sz, Vm, Vn, Vd, FPComparisonType::GT);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SQSHL_reg_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
const size_t esize = 8U << size.ZeroExtend();
|
||||
|
||||
const IR::U128 operand1 = ir.ZeroExtendToQuad(ir.VectorGetElement(esize, V(128, Vn), 0));
|
||||
const IR::U128 operand2 = ir.ZeroExtendToQuad(ir.VectorGetElement(esize, V(128, Vm), 0));
|
||||
const IR::U128 result = ir.VectorSignedSaturatedShiftLeft(esize, operand1, operand2);
|
||||
|
||||
ir.SetQ(Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SRSHL_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
return RoundingShiftLeft(*this, size, Vm, Vn, Vd, Signedness::Signed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user