Home | History | Annotate | Download | only in TableGen

Lines Matching refs:proto

656 static bool UseMacro(const std::string &proto) {
660 if (proto.find('i') != std::string::npos)
665 if (proto.find('p') != std::string::npos ||
666 proto.find('c') != std::string::npos)
675 static bool MacroArgUsedDirectly(const std::string &proto, unsigned i) {
677 return (proto[i] == 'i' || proto[i] == 'p' || proto[i] == 'c');
681 static std::string GenArgs(const std::string &proto, StringRef typestr) {
682 bool define = UseMacro(proto);
688 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
693 if (MacroArgUsedDirectly(proto, i))
696 s += TypeString(proto[i], typestr) + " __";
709 static std::string GenMacroLocals(const std::string &proto, StringRef typestr) {
714 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
717 if (MacroArgUsedDirectly(proto, i))
721 s += TypeString(proto[i], typestr) + " __";
785 static std::string GenOpString(OpKind op, const std::string &proto,
789 bool define = UseMacro(proto);
791 std::string ts = TypeString(proto[0], typestr);
949 ts = TypeString(proto[1], typestr);
983 s += "(" + TypeString(proto[0], typestr) + ")";
1000 s += "(" + TypeString(proto[0], typestr) + ")";
1014 static unsigned GetNeonEnum(const std::string &proto, StringRef typestr) {
1015 unsigned mod = proto[0];
1018 mod = proto[1];
1056 NeonTypeFlags Flags(ET, usgn, quad && proto[1] != 'g');
1061 static std::string GenBuiltin(const std::string &name, const std::string &proto,
1067 bool sret = (proto[0] >= '2' && proto[0] <= '4');
1069 bool define = UseMacro(proto);
1074 if (proto.find('s') == std::string::npos)
1077 if (proto[0] != 'v') {
1078 std::string ts = TypeString(proto[0], typestr);
1092 bool splat = proto.find('a') != std::string::npos;
1110 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
1122 argType = ModType(proto[i], argType, argQuad, argPoly, argUsgn, argScalar,
1127 if (proto[i] >= '2' && proto[i] <= '4') {
1132 for (unsigned vi = 0, ve = proto[i] - '0'; vi != ve; ++vi) {
1164 s += ", " + utostr(GetNeonEnum(proto, typestr));
1168 if (proto[0] != 'v' && sret) {
1178 const std::string &proto,
1185 if (proto.find('s') == std::string::npos)
1191 for (unsigned i = 0, e = proto.size(); i != e; ++i)
1192 s += BuiltinTypeString(proto[i], typestr, ck, i == 0);
1203 const std::string &proto,
1206 assert(!proto.empty() && "");
1207 bool define = UseMacro(proto) && kind != OpUnavailable;
1214 s += "__ai " + TypeString(proto[0], outTypeStr) + " ";
1229 s += GenArgs(proto, inTypeStr);
1234 s += GenMacroLocals(proto, inTypeStr);
1242 s += GenOpString(kind, proto, outTypeStr);
1244 s += GenBuiltin(name, proto, outTypeStr, classKind);
1374 std::string Proto = R->getValueAsString("Prototype");
1399 OS << GenIntrinsic(name, Proto, TypeVec[ti], TypeVec[srcti],
1403 OS << GenIntrinsic(name, Proto, TypeVec[ti], TypeVec[ti],
1449 std::string Proto = R->getValueAsString("Prototype");
1453 if (Proto.find('a') != std::string::npos)
1470 std::string bd = GenBuiltinDef(name, Proto, TypeVec[ti], ck);
1488 std::string Proto = R->getValueAsString("Prototype");
1494 if (Proto.find('a') != std::string::npos)
1499 if (Proto.find('s') != std::string::npos)
1517 qmask |= 1ULL << GetNeonEnum(Proto, TypeVec[ti]);
1520 mask |= 1ULL << GetNeonEnum(Proto, TypeVec[ti]);
1527 for (unsigned arg = 1, arge = Proto.size(); arg != arge; ++arg) {
1528 char ArgType = Proto[arg];
1540 if (PtrArgNum >= 0 && (Proto[0] >= '2' && Proto[0] <= '4'))
1587 std::string Proto = R->getValueAsString("Prototype");
1592 if (Proto.find('a') != std::string::npos)
1597 size_t immPos = Proto.find('i');
1617 } else if (Proto.find('s') == std::string::npos) {
1632 rangestr = "u = " + utostr(RangeFromType(Proto[immPos-1], TypeVec[ti]));
1645 if (Proto[0] >= '2' && Proto[0] <= '4')
1650 for (unsigned ii = 1, ie = Proto.size(); ii != ie; ++ii) {
1651 switch (Proto[ii]) {
1669 const std::string &proto,
1672 assert(!proto.empty() && "");
1691 s += TypeString(proto[0], outTypeStr) + " test_" + mangledName + "(";
1694 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
1696 if (proto[i] == 'i')
1698 s += comma + TypeString(proto[i], inTypeStr) + " ";
1704 if (proto[0] != 'v')
1708 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
1709 if (proto[i] == 'i') {
1715 s += utostr(RangeFromType(proto[i-1], inTypeStr));
1740 std::string Proto = R->getValueAsString("Prototype");
1761 OS << GenTest(name, Proto, TypeVec[ti], TypeVec[srcti], isShift);
1764 OS << GenTest(name, Proto, TypeVec[ti], TypeVec[ti], isShift);