A64: Implement UABDL/UABDL2
This commit is contained in:
parent
6de5ed96e5
commit
3397742c74
2 changed files with 17 additions and 1 deletions
|
@ -695,7 +695,7 @@ INST(USUBW, "USUBW, USUBW2", "0Q101
|
|||
INST(RADDHN, "RADDHN, RADDHN2", "0Q101110zz1mmmmm010000nnnnnddddd")
|
||||
//INST(UABAL, "UABAL, UABAL2", "0Q101110zz1mmmmm010100nnnnnddddd")
|
||||
INST(RSUBHN, "RSUBHN, RSUBHN2", "0Q101110zz1mmmmm011000nnnnnddddd")
|
||||
//INST(UABDL, "UABDL, UABDL2", "0Q101110zz1mmmmm011100nnnnnddddd")
|
||||
INST(UABDL, "UABDL, UABDL2", "0Q101110zz1mmmmm011100nnnnnddddd")
|
||||
//INST(UMLAL_vec, "UMLAL, UMLAL2 (vector)", "0Q101110zz1mmmmm100000nnnnnddddd")
|
||||
//INST(UMLSL_vec, "UMLSL, UMLSL2 (vector)", "0Q101110zz1mmmmm101000nnnnnddddd")
|
||||
//INST(UMULL_vec, "UMULL, UMULL2 (vector)", "0Q101110zz1mmmmm110000nnnnnddddd")
|
||||
|
|
|
@ -88,6 +88,22 @@ bool TranslatorVisitor::UADDL(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::UABDL(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
if (size == 0b11) {
|
||||
return ReservedValue();
|
||||
}
|
||||
|
||||
const size_t esize = 8 << size.ZeroExtend();
|
||||
const size_t datasize = 64;
|
||||
|
||||
const IR::U128 operand1 = ir.VectorZeroExtend(esize, Vpart(datasize, Vn, Q));
|
||||
const IR::U128 operand2 = ir.VectorZeroExtend(esize, Vpart(datasize, Vm, Q));
|
||||
const IR::U128 result = ir.VectorUnsignedAbsoluteDifference(esize, operand1, operand2);
|
||||
|
||||
V(2 * datasize, Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::UADDW(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
if (size == 0b11) {
|
||||
return ReservedValue();
|
||||
|
|
Loading…
Reference in a new issue