A64: Implement CMEQ (register, scalar)
This commit is contained in:
parent
5b8c9e5146
commit
19e276d10f
2 changed files with 8 additions and 1 deletions
|
@ -463,7 +463,7 @@ INST(CMHS_1, "CMHS (register)", "01111
|
||||||
//INST(URSHL_1, "URSHL", "01111110zz1mmmmm010101nnnnnddddd")
|
//INST(URSHL_1, "URSHL", "01111110zz1mmmmm010101nnnnnddddd")
|
||||||
//INST(UQRSHL_1, "UQRSHL", "01111110zz1mmmmm010111nnnnnddddd")
|
//INST(UQRSHL_1, "UQRSHL", "01111110zz1mmmmm010111nnnnnddddd")
|
||||||
INST(SUB_1, "SUB (vector)", "01111110zz1mmmmm100001nnnnnddddd")
|
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")
|
//INST(SQRDMULH_vec_1, "SQRDMULH (vector)", "01111110zz1mmmmm101101nnnnnddddd")
|
||||||
|
|
||||||
// Data Processing - FP and SIMD - SIMD Scalar shift by immediate
|
// Data Processing - FP and SIMD - SIMD Scalar shift by immediate
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
namespace Dynarmic::A64 {
|
namespace Dynarmic::A64 {
|
||||||
namespace {
|
namespace {
|
||||||
enum class ComparisonType {
|
enum class ComparisonType {
|
||||||
|
EQ,
|
||||||
GE,
|
GE,
|
||||||
GT,
|
GT,
|
||||||
HI,
|
HI,
|
||||||
|
@ -29,6 +30,8 @@ bool ScalarCompare(TranslatorVisitor& v, Imm<2> size, Vec Vm, Vec Vn, Vec Vd, Co
|
||||||
|
|
||||||
const IR::U128 result = [&] {
|
const IR::U128 result = [&] {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case ComparisonType::EQ:
|
||||||
|
return v.ir.VectorEqual(esize, operand1, operand2);
|
||||||
case ComparisonType::GE:
|
case ComparisonType::GE:
|
||||||
return v.ir.VectorGreaterEqualSigned(esize, operand1, operand2);
|
return v.ir.VectorGreaterEqualSigned(esize, operand1, operand2);
|
||||||
case ComparisonType::GT:
|
case ComparisonType::GT:
|
||||||
|
@ -60,6 +63,10 @@ bool TranslatorVisitor::ADD_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||||
return true;
|
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) {
|
bool TranslatorVisitor::CMGE_reg_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||||
return ScalarCompare(*this, size, Vm, Vn, Vd, ComparisonType::GE);
|
return ScalarCompare(*this, size, Vm, Vn, Vd, ComparisonType::GE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue