A64: Implement MUL (vector)
This commit is contained in:
parent
b6de612e01
commit
3afd2fcbad
2 changed files with 16 additions and 1 deletions
|
@ -709,7 +709,7 @@ INST(XTN, "XTN, XTN2", "0Q001
|
||||||
INST(ADD_vector, "ADD (vector)", "0Q001110zz1mmmmm100001nnnnnddddd")
|
INST(ADD_vector, "ADD (vector)", "0Q001110zz1mmmmm100001nnnnnddddd")
|
||||||
//INST(CMTST_2, "CMTST", "0Q001110zz1mmmmm100011nnnnnddddd")
|
//INST(CMTST_2, "CMTST", "0Q001110zz1mmmmm100011nnnnnddddd")
|
||||||
//INST(MLA_vec, "MLA (vector)", "0Q001110zz1mmmmm100101nnnnnddddd")
|
//INST(MLA_vec, "MLA (vector)", "0Q001110zz1mmmmm100101nnnnnddddd")
|
||||||
//INST(MUL_vec, "MUL (vector)", "0Q001110zz1mmmmm100111nnnnnddddd")
|
INST(MUL_vec, "MUL (vector)", "0Q001110zz1mmmmm100111nnnnnddddd")
|
||||||
//INST(SMAXP, "SMAXP", "0Q001110zz1mmmmm101001nnnnnddddd")
|
//INST(SMAXP, "SMAXP", "0Q001110zz1mmmmm101001nnnnnddddd")
|
||||||
//INST(SMINP, "SMINP", "0Q001110zz1mmmmm101011nnnnnddddd")
|
//INST(SMINP, "SMINP", "0Q001110zz1mmmmm101011nnnnnddddd")
|
||||||
//INST(SQDMULH_vec_2, "SQDMULH (vector)", "0Q001110zz1mmmmm101101nnnnnddddd")
|
//INST(SQDMULH_vec_2, "SQDMULH (vector)", "0Q001110zz1mmmmm101101nnnnnddddd")
|
||||||
|
|
|
@ -23,6 +23,21 @@ bool TranslatorVisitor::ADD_vector(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TranslatorVisitor::MUL_vec(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||||
|
if (size == 0b11) return ReservedValue();
|
||||||
|
const size_t esize = 8 << size.ZeroExtend<size_t>();
|
||||||
|
const size_t datasize = Q ? 128 : 64;
|
||||||
|
|
||||||
|
const IR::U128 operand1 = V(datasize, Vn);
|
||||||
|
const IR::U128 operand2 = V(datasize, Vm);
|
||||||
|
|
||||||
|
const IR::U128 result = ir.VectorMultiply(esize, operand1, operand2);
|
||||||
|
|
||||||
|
V(datasize, Vd, result);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool TranslatorVisitor::ADDP_vec(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
bool TranslatorVisitor::ADDP_vec(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||||
if (size == 0b11 && !Q) return ReservedValue();
|
if (size == 0b11 && !Q) return ReservedValue();
|
||||||
const size_t esize = 8 << size.ZeroExtend<size_t>();
|
const size_t esize = 8 << size.ZeroExtend<size_t>();
|
||||||
|
|
Loading…
Reference in a new issue