Lines Matching defs:Proto
853 const std::string &Proto,
861 for (size_t i = 0, end = Proto.size(); i < end; i++) {
862 switch (Proto[i]) {
911 // If NormedProto.size() == 4 and the first two proto characters are the
936 const std::string &Proto,
948 const StringRef ProtoRef(Proto);
975 // We first normalize our proto, since we only need to emit 4
976 // different types of checks, yet have more than 4 proto types
979 NormalizeProtoForRegisterPatternCreation(Name, Proto, HasNPostfix, IsQuad,
1016 const std::string &Proto,
1064 GenerateRegisterCheckPattern(Name, Proto, OutTypeCode, HasNPostfix, IsQuad,
1170 static bool UseMacro(const std::string &proto) {
1174 if (proto.find('i') != std::string::npos)
1179 if (proto.find('p') != std::string::npos ||
1180 proto.find('c') != std::string::npos)
1189 static bool MacroArgUsedDirectly(const std::string &proto, unsigned i) {
1191 return (proto[i] == 'i' || proto[i] == 'p' || proto[i] == 'c');
1195 static std::string GenArgs(const std::string &proto, StringRef typestr) {
1196 bool define = UseMacro(proto);
1202 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
1207 if (MacroArgUsedDirectly(proto, i))
1210 s += TypeString(proto[i], typestr) + " __";
1223 static std::string GenMacroLocals(const std::string &proto, StringRef typestr) {
1228 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
1231 if (MacroArgUsedDirectly(proto, i))
1235 s += TypeString(proto[i], typestr) + " __";
1302 static std::string GenOpString(OpKind op, const std::string &proto,
1306 bool define = UseMacro(proto);
1308 std::string ts = TypeString(proto[0], typestr);
1471 ts = TypeString(proto[1], typestr);
1505 s += "(" + TypeString(proto[0], typestr) + ")";
1522 s += "(" + TypeString(proto[0], typestr) + ")";
1539 static unsigned GetNeonEnum(const std::string &proto, StringRef typestr) {
1540 unsigned mod = proto[0];
1543 mod = proto[1];
1584 NeonTypeFlags Flags(ET, usgn, quad && proto[1] != 'g');
1589 static std::string GenBuiltin(const std::string &name, const std::string &proto,
1595 bool sret = (proto[0] >= '2' && proto[0] <= '4');
1597 bool define = UseMacro(proto);
1602 if (proto.find('s') == std::string::npos)
1605 if (proto[0] != 'v') {
1606 std::string ts = TypeString(proto[0], typestr);
1620 bool splat = proto.find('a') != std::string::npos;
1638 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
1650 argType = ModType(proto[i], argType, argQuad, argPoly, argUsgn, argScalar,
1655 if (proto[i] >= '2' && proto[i] <= '4') {
1660 for (unsigned vi = 0, ve = proto[i] - '0'; vi != ve; ++vi) {
1692 s += ", " + utostr(GetNeonEnum(proto, typestr));
1696 if (proto[0] != 'v' && sret) {
1706 const std::string &proto,
1713 if (proto.find('s') == std::string::npos)
1719 for (unsigned i = 0, e = proto.size(); i != e; ++i)
1720 s += BuiltinTypeString(proto[i], typestr, ck, i == 0);
1731 const std::string &proto,
1734 assert(!proto.empty() && "");
1735 bool define = UseMacro(proto) && kind != OpUnavailable;
1742 s += "__ai " + TypeString(proto[0], outTypeStr) + " ";
1757 s += GenArgs(proto, inTypeStr);
1762 s += GenMacroLocals(proto, inTypeStr);
1770 s += GenOpString(kind, proto, outTypeStr);
1772 s += GenBuiltin(name, proto, outTypeStr, classKind);
1968 std::string Proto = R->getValueAsString("Prototype");
1993 std::string s = GenIntrinsic(name, Proto, TypeVec[ti], TypeVec[srcti],
2002 GenIntrinsic(name, Proto, TypeVec[ti], TypeVec[ti], kind, classKind);
2057 std::string Proto = R->getValueAsString("Prototype");
2062 if (Proto.find('a') != std::string::npos)
2067 size_t immPos = Proto.find('i');
2100 } else if (Proto.find('s') == std::string::npos) {
2116 "u = " + utostr(RangeFromType(Proto[immPos - 1], TypeVec[ti]));
2129 if (Proto[0] >= '2' && Proto[0] <= '4')
2134 for (unsigned ii = 1, ie = Proto.size(); ii != ie; ++ii) {
2135 switch (Proto[ii]) {
2185 std::string Proto = R->getValueAsString("Prototype");
2191 if (Proto.find('a') != std::string::npos)
2196 if (Proto.find('s') != std::string::npos)
2229 qmask |= 1ULL << GetNeonEnum(Proto, TypeVec[ti]);
2232 mask |= 1ULL << GetNeonEnum(Proto, TypeVec[ti]);
2239 for (unsigned arg = 1, arge = Proto.size(); arg != arge; ++arg) {
2240 char ArgType = Proto[arg];
2252 if (PtrArgNum >= 0 && (Proto[0] >= '2' && Proto[0] <= '4'))
2316 std::string Proto = R->getValueAsString("Prototype");
2321 if (Proto.find('a') != std::string::npos)
2352 std::string bd = GenBuiltinDef(name, Proto, TypeVec[ti], ck);
2411 const std::string &proto,
2417 assert(!proto.empty() && "");
2435 GenerateChecksForIntrinsic(name, proto, outTypeStr, inTypeStr, ck, InstName,
2455 testFuncProto = TypeString(proto[0], outTypeStr) + " test_" + mangledName + "(";
2458 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
2460 if (proto[i] == 'i')
2462 testFuncProto += comma + TypeString(proto[i], inTypeStr) + " ";
2471 if (proto[0] != 'v')
2475 for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
2476 if (proto[i] == 'i') {
2482 s += utostr(RangeFromType(proto[i-1], inTypeStr));
2504 std::string Proto = R->getValueAsString("Prototype");
2535 std::string s = GenTest(name, Proto, TypeVec[ti], TypeVec[srcti],
2545 std::string s = GenTest(name, Proto, TypeVec[ti], TypeVec[ti], isShift,