reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
3005 OS << "static bool "; 3006 OS << "checkAsmTiedOperandConstraints(const " << Target.getName() 3008 OS << " unsigned Kind,\n"; 3009 OS << " const OperandVector &Operands,\n"; 3010 OS << " uint64_t &ErrorInfo) {\n"; 3011 OS << " assert(Kind < CVT_NUM_SIGNATURES && \"Invalid signature!\");\n"; 3012 OS << " const uint8_t *Converter = ConversionTable[Kind];\n"; 3013 OS << " for (const uint8_t *p = Converter; *p; p+= 2) {\n"; 3014 OS << " switch (*p) {\n"; 3015 OS << " case CVT_Tied: {\n"; 3016 OS << " unsigned OpIdx = *(p+1);\n"; 3017 OS << " assert(OpIdx < (size_t)(std::end(TiedAsmOperandTable) -\n"; 3018 OS << " std::begin(TiedAsmOperandTable)) &&\n"; 3019 OS << " \"Tied operand not found\");\n"; 3020 OS << " unsigned OpndNum1 = TiedAsmOperandTable[OpIdx][1];\n"; 3021 OS << " unsigned OpndNum2 = TiedAsmOperandTable[OpIdx][2];\n"; 3022 OS << " if (OpndNum1 != OpndNum2) {\n"; 3023 OS << " auto &SrcOp1 = Operands[OpndNum1];\n"; 3024 OS << " auto &SrcOp2 = Operands[OpndNum2];\n"; 3025 OS << " if (SrcOp1->isReg() && SrcOp2->isReg()) {\n"; 3026 OS << " if (!AsmParser.regsEqual(*SrcOp1, *SrcOp2)) {\n"; 3027 OS << " ErrorInfo = OpndNum2;\n"; 3028 OS << " return false;\n"; 3029 OS << " }\n"; 3030 OS << " }\n"; 3031 OS << " }\n"; 3032 OS << " break;\n"; 3033 OS << " }\n"; 3034 OS << " default:\n"; 3035 OS << " break;\n"; 3036 OS << " }\n"; 3037 OS << " }\n"; 3038 OS << " return true;\n"; 3039 OS << "}\n\n";