A64: Implement CMLT (zero)'s scalar single/double-precision variant
This commit is contained in:
parent
8863c9bb4b
commit
6534184df2
2 changed files with 9 additions and 2 deletions
|
@ -409,7 +409,7 @@ INST(UCVTF_int_2, "UCVTF (vector, integer)", "01111
|
||||||
//INST(SQABS_1, "SQABS", "01011110zz100000011110nnnnnddddd")
|
//INST(SQABS_1, "SQABS", "01011110zz100000011110nnnnnddddd")
|
||||||
INST(CMGT_zero_1, "CMGT (zero)", "01011110zz100000100010nnnnnddddd")
|
INST(CMGT_zero_1, "CMGT (zero)", "01011110zz100000100010nnnnnddddd")
|
||||||
INST(CMEQ_zero_1, "CMEQ (zero)", "01011110zz100000100110nnnnnddddd")
|
INST(CMEQ_zero_1, "CMEQ (zero)", "01011110zz100000100110nnnnnddddd")
|
||||||
//INST(CMLT_1, "CMLT (zero)", "01011110zz100000101010nnnnnddddd")
|
INST(CMLT_1, "CMLT (zero)", "01011110zz100000101010nnnnnddddd")
|
||||||
INST(ABS_1, "ABS", "01011110zz100000101110nnnnnddddd")
|
INST(ABS_1, "ABS", "01011110zz100000101110nnnnnddddd")
|
||||||
//INST(SQXTN_1, "SQXTN, SQXTN2", "01011110zz100001010010nnnnnddddd")
|
//INST(SQXTN_1, "SQXTN, SQXTN2", "01011110zz100001010010nnnnnddddd")
|
||||||
//INST(USQADD_1, "USQADD", "01111110zz100000001110nnnnnddddd")
|
//INST(USQADD_1, "USQADD", "01111110zz100000001110nnnnnddddd")
|
||||||
|
|
|
@ -16,6 +16,7 @@ enum class ComparisonType {
|
||||||
GT,
|
GT,
|
||||||
HI,
|
HI,
|
||||||
HS,
|
HS,
|
||||||
|
LT,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class ComparisonVariant {
|
enum class ComparisonVariant {
|
||||||
|
@ -46,8 +47,10 @@ bool ScalarCompare(TranslatorVisitor& v, Imm<2> size, boost::optional<Vec> Vm, V
|
||||||
case ComparisonType::HI:
|
case ComparisonType::HI:
|
||||||
return v.ir.VectorGreaterUnsigned(esize, operand1, operand2);
|
return v.ir.VectorGreaterUnsigned(esize, operand1, operand2);
|
||||||
case ComparisonType::HS:
|
case ComparisonType::HS:
|
||||||
default:
|
|
||||||
return v.ir.VectorGreaterEqualUnsigned(esize, operand1, operand2);
|
return v.ir.VectorGreaterEqualUnsigned(esize, operand1, operand2);
|
||||||
|
case ComparisonType::LT:
|
||||||
|
default:
|
||||||
|
return v.ir.VectorLessSigned(esize, operand1, operand2);
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
@ -94,6 +97,10 @@ bool TranslatorVisitor::CMGT_zero_1(Imm<2> size, Vec Vn, Vec Vd) {
|
||||||
return ScalarCompare(*this, size, {}, Vn, Vd, ComparisonType::GT, ComparisonVariant::Zero);
|
return ScalarCompare(*this, size, {}, Vn, Vd, ComparisonType::GT, ComparisonVariant::Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TranslatorVisitor::CMLT_1(Imm<2> size, Vec Vn, Vec Vd) {
|
||||||
|
return ScalarCompare(*this, size, {}, Vn, Vd, ComparisonType::LT, ComparisonVariant::Zero);
|
||||||
|
}
|
||||||
|
|
||||||
bool TranslatorVisitor::CMHI_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
bool TranslatorVisitor::CMHI_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||||
return ScalarCompare(*this, size, Vm, Vn, Vd, ComparisonType::HI, ComparisonVariant::Register);
|
return ScalarCompare(*this, size, Vm, Vn, Vd, ComparisonType::HI, ComparisonVariant::Register);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue