A64: Implement SABD
This commit is contained in:
parent
1e10017f4b
commit
f00789e6f7
2 changed files with 17 additions and 1 deletions
|
@ -714,7 +714,7 @@ INST(SSHL_2, "SSHL", "0Q001
|
||||||
//INST(SQRSHL_2, "SQRSHL", "0Q001110zz1mmmmm010111nnnnnddddd")
|
//INST(SQRSHL_2, "SQRSHL", "0Q001110zz1mmmmm010111nnnnnddddd")
|
||||||
INST(SMAX, "SMAX", "0Q001110zz1mmmmm011001nnnnnddddd")
|
INST(SMAX, "SMAX", "0Q001110zz1mmmmm011001nnnnnddddd")
|
||||||
INST(SMIN, "SMIN", "0Q001110zz1mmmmm011011nnnnnddddd")
|
INST(SMIN, "SMIN", "0Q001110zz1mmmmm011011nnnnnddddd")
|
||||||
//INST(SABD, "SABD", "0Q001110zz1mmmmm011101nnnnnddddd")
|
INST(SABD, "SABD", "0Q001110zz1mmmmm011101nnnnnddddd")
|
||||||
//INST(SABA, "SABA", "0Q001110zz1mmmmm011111nnnnnddddd")
|
//INST(SABA, "SABA", "0Q001110zz1mmmmm011111nnnnnddddd")
|
||||||
INST(ADD_vector, "ADD (vector)", "0Q001110zz1mmmmm100001nnnnnddddd")
|
INST(ADD_vector, "ADD (vector)", "0Q001110zz1mmmmm100001nnnnnddddd")
|
||||||
INST(CMTST_2, "CMTST", "0Q001110zz1mmmmm100011nnnnnddddd")
|
INST(CMTST_2, "CMTST", "0Q001110zz1mmmmm100011nnnnnddddd")
|
||||||
|
|
|
@ -73,6 +73,22 @@ bool TranslatorVisitor::CMGE_reg_2(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TranslatorVisitor::SABD(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||||
|
if (size == 0b11) {
|
||||||
|
return ReservedValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
const size_t datasize = Q ? 128 : 64;
|
||||||
|
const size_t esize = 8 << size.ZeroExtend();
|
||||||
|
|
||||||
|
const IR::U128 operand1 = V(datasize, Vn);
|
||||||
|
const IR::U128 operand2 = V(datasize, Vm);
|
||||||
|
const IR::U128 result = ir.VectorSignedAbsoluteDifference(esize, operand1, operand2);
|
||||||
|
|
||||||
|
V(datasize, Vd, result);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool TranslatorVisitor::SMAX(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
bool TranslatorVisitor::SMAX(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||||
if (size == 0b11) {
|
if (size == 0b11) {
|
||||||
return ReservedValue();
|
return ReservedValue();
|
||||||
|
|
Loading…
Reference in a new issue