Home | History | Annotate | Download | only in TableGen

Lines Matching refs:Proto

654 static bool UseMacro(const std::string &proto) {
658 if (proto.find('i') != std::string::npos)
663 if (proto.find('p') != std::string::npos ||
664 proto.find('c') != std::string::npos)
673 static bool MacroArgUsedDirectly(const std::string &proto, unsigned i) {
675 return (proto[i] == 'i' || proto[i] == 'p' || proto[i] == 'c');
679 static std::string GenArgs(const std::string &proto, StringRef typestr) {
680 bool define = UseMacro(proto);
686 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
691 if (MacroArgUsedDirectly(proto, i))
694 s += TypeString(proto[i], typestr) + " __";
707 static std::string GenMacroLocals(const std::string &proto, StringRef typestr) {
712 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
715 if (MacroArgUsedDirectly(proto, i))
719 s += TypeString(proto[i], typestr) + " __";
783 static std::string GenOpString(OpKind op, const std::string &proto,
787 bool define = UseMacro(proto);
789 std::string ts = TypeString(proto[0], typestr);
947 ts = TypeString(proto[1], typestr);
981 s += "(" + TypeString(proto[0], typestr) + ")";
998 s += "(" + TypeString(proto[0], typestr) + ")";
1012 static unsigned GetNeonEnum(const std::string &proto, StringRef typestr) {
1013 unsigned mod = proto[0];
1016 mod = proto[1];
1054 NeonTypeFlags Flags(ET, usgn, quad && proto[1] != 'g');
1059 static std::string GenBuiltin(const std::string &name, const std::string &proto,
1065 bool sret = (proto[0] >= '2' && proto[0] <= '4');
1067 bool define = UseMacro(proto);
1072 if (proto.find('s') == std::string::npos)
1075 if (proto[0] != 'v') {
1076 std::string ts = TypeString(proto[0], typestr);
1090 bool splat = proto.find('a') != std::string::npos;
1108 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
1120 argType = ModType(proto[i], argType, argQuad, argPoly, argUsgn, argScalar,
1125 if (proto[i] >= '2' && proto[i] <= '4') {
1130 for (unsigned vi = 0, ve = proto[i] - '0'; vi != ve; ++vi) {
1162 s += ", " + utostr(GetNeonEnum(proto, typestr));
1166 if (proto[0] != 'v' && sret) {
1176 const std::string &proto,
1183 if (proto.find('s') == std::string::npos)
1189 for (unsigned i = 0, e = proto.size(); i != e; ++i)
1190 s += BuiltinTypeString(proto[i], typestr, ck, i == 0);
1201 const std::string &proto,
1204 assert(!proto.empty() && "");
1205 bool define = UseMacro(proto) && kind != OpUnavailable;
1212 s += "__ai " + TypeString(proto[0], outTypeStr) + " ";
1227 s += GenArgs(proto, inTypeStr);
1232 s += GenMacroLocals(proto, inTypeStr);
1240 s += GenOpString(kind, proto, outTypeStr);
1242 s += GenBuiltin(name, proto, outTypeStr, classKind);
1372 std::string Proto = R->getValueAsString("Prototype");
1397 OS << GenIntrinsic(name, Proto, TypeVec[ti], TypeVec[srcti],
1401 OS << GenIntrinsic(name, Proto, TypeVec[ti], TypeVec[ti],
1447 std::string Proto = R->getValueAsString("Prototype");
1451 if (Proto.find('a') != std::string::npos)
1468 std::string bd = GenBuiltinDef(name, Proto, TypeVec[ti], ck);
1486 std::string Proto = R->getValueAsString("Prototype");
1492 if (Proto.find('a') != std::string::npos)
1497 if (Proto.find('s') != std::string::npos)
1515 qmask |= 1ULL << GetNeonEnum(Proto, TypeVec[ti]);
1518 mask |= 1ULL << GetNeonEnum(Proto, TypeVec[ti]);
1525 for (unsigned arg = 1, arge = Proto.size(); arg != arge; ++arg) {
1526 char ArgType = Proto[arg];
1538 if (PtrArgNum >= 0 && (Proto[0] >= '2' && Proto[0] <= '4'))
1585 std::string Proto = R->getValueAsString("Prototype");
1590 if (Proto.find('a') != std::string::npos)
1595 size_t immPos = Proto.find('i');
1615 } else if (Proto.find('s') == std::string::npos) {
1630 rangestr = "u = " + utostr(RangeFromType(Proto[immPos-1], TypeVec[ti]));
1643 if (Proto[0] >= '2' && Proto[0] <= '4')
1648 for (unsigned ii = 1, ie = Proto.size(); ii != ie; ++ii) {
1649 switch (Proto[ii]) {
1667 const std::string &proto,
1670 assert(!proto.empty() && "");
1689 s += TypeString(proto[0], outTypeStr) + " test_" + mangledName + "(";
1692 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
1694 if (proto[i] == 'i')
1696 s += comma + TypeString(proto[i], inTypeStr) + " ";
1702 if (proto[0] != 'v')
1706 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
1707 if (proto[i] == 'i') {
1713 s += utostr(RangeFromType(proto[i-1], inTypeStr));
1738 std::string Proto = R->getValueAsString("Prototype");
1759 OS << GenTest(name, Proto, TypeVec[ti], TypeVec[srcti], isShift);
1762 OS << GenTest(name, Proto, TypeVec[ti], TypeVec[ti], isShift);