return s;
}
+// Use the vmovl builtin to sign-extend or zero-extend a vector.
+static std::string Extend(const std::string &proto, StringRef typestr,
+ const std::string &a) {
+ std::string s;
+ s = MangleName("vmovl", typestr, ClassS);
+ s += "(" + a + ")";
+ return s;
+}
+
static std::string Duplicate(unsigned nElts, StringRef typestr,
const std::string &a) {
std::string s;
case OpMul:
s += "__a * __b;";
break;
+ case OpMullN:
+ s += Extend(proto, typestr, "__a") + " * " +
+ Extend(proto, typestr,
+ Duplicate(nElts << (int)quad, typestr, "__b")) + ";";
+ break;
+ case OpMull:
+ s += Extend(proto, typestr, "__a") + " * " +
+ Extend(proto, typestr, "__b") + ";";
+ break;
case OpMlaN:
s += "__a + (__b * " + Duplicate(nElts, typestr, "__c") + ");";
break;
OpAdd,
OpSub,
OpMul,
+ OpMull,
OpMla,
OpMls,
OpMulN,
+ OpMullN,
OpMlaN,
OpMlsN,
OpMulLane,
OpMap["OP_ADD"] = OpAdd;
OpMap["OP_SUB"] = OpSub;
OpMap["OP_MUL"] = OpMul;
+ OpMap["OP_MULL"] = OpMull;
OpMap["OP_MLA"] = OpMla;
OpMap["OP_MLS"] = OpMls;
OpMap["OP_MUL_N"] = OpMulN;
+ OpMap["OP_MULL_N"]= OpMullN;
OpMap["OP_MLA_N"] = OpMlaN;
OpMap["OP_MLS_N"] = OpMlsN;
OpMap["OP_MUL_LN"]= OpMulLane;