mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-07 15:08:22 +01:00
A32: Implement ASIMD VQABS
This commit is contained in:
parent
b88c291f81
commit
f6b665f5a4
3 changed files with 22 additions and 1 deletions
|
|
@ -133,6 +133,26 @@ bool ArmTranslatorVisitor::asimd_VCNT(bool D, size_t sz, size_t Vd, bool Q, bool
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ArmTranslatorVisitor::asimd_VQABS(bool D, size_t sz, size_t Vd, bool Q, bool M, size_t Vm) {
|
||||
if (sz == 0b11) {
|
||||
return UndefinedInstruction();
|
||||
}
|
||||
|
||||
if (Q && (Common::Bit<0>(Vd) || Common::Bit<0>(Vm))) {
|
||||
return UndefinedInstruction();
|
||||
}
|
||||
|
||||
const size_t esize = 8U << sz;
|
||||
const auto d = ToVector(Q, Vd, D);
|
||||
const auto m = ToVector(Q, Vm, M);
|
||||
|
||||
const auto reg_m = ir.GetVector(m);
|
||||
const auto result = ir.VectorSignedSaturatedAbs(esize, reg_m);
|
||||
|
||||
ir.SetVector(d, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ArmTranslatorVisitor::asimd_VABS(bool D, size_t sz, size_t Vd, bool F, bool Q, bool M, size_t Vm) {
|
||||
if (sz == 0b11 || (F && sz != 0b10)) {
|
||||
return UndefinedInstruction();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue