diff --git a/src/frontend/A64/decoder/a64.inc b/src/frontend/A64/decoder/a64.inc index 79773b64..3839f5dd 100644 --- a/src/frontend/A64/decoder/a64.inc +++ b/src/frontend/A64/decoder/a64.inc @@ -463,7 +463,7 @@ INST(CMHS_1, "CMHS (register)", "01111 //INST(URSHL_1, "URSHL", "01111110zz1mmmmm010101nnnnnddddd") //INST(UQRSHL_1, "UQRSHL", "01111110zz1mmmmm010111nnnnnddddd") INST(SUB_1, "SUB (vector)", "01111110zz1mmmmm100001nnnnnddddd") -//INST(CMEQ_reg_1, "CMEQ (register)", "01111110zz1mmmmm100011nnnnnddddd") +INST(CMEQ_reg_1, "CMEQ (register)", "01111110zz1mmmmm100011nnnnnddddd") //INST(SQRDMULH_vec_1, "SQRDMULH (vector)", "01111110zz1mmmmm101101nnnnnddddd") // Data Processing - FP and SIMD - SIMD Scalar shift by immediate diff --git a/src/frontend/A64/translate/impl/simd_scalar_three_same.cpp b/src/frontend/A64/translate/impl/simd_scalar_three_same.cpp index 95617ed3..fa2d238b 100644 --- a/src/frontend/A64/translate/impl/simd_scalar_three_same.cpp +++ b/src/frontend/A64/translate/impl/simd_scalar_three_same.cpp @@ -10,6 +10,7 @@ namespace Dynarmic::A64 { namespace { enum class ComparisonType { + EQ, GE, GT, HI, @@ -29,6 +30,8 @@ bool ScalarCompare(TranslatorVisitor& v, Imm<2> size, Vec Vm, Vec Vn, Vec Vd, Co const IR::U128 result = [&] { switch (type) { + case ComparisonType::EQ: + return v.ir.VectorEqual(esize, operand1, operand2); case ComparisonType::GE: return v.ir.VectorGreaterEqualSigned(esize, operand1, operand2); case ComparisonType::GT: @@ -60,6 +63,10 @@ bool TranslatorVisitor::ADD_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) { return true; } +bool TranslatorVisitor::CMEQ_reg_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) { + return ScalarCompare(*this, size, Vm, Vn, Vd, ComparisonType::EQ); +} + bool TranslatorVisitor::CMGE_reg_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) { return ScalarCompare(*this, size, Vm, Vn, Vd, ComparisonType::GE); }