llvm.org GIT mirror llvm / 8625909
Merge from mainline. fix an off-by-one error in my previous patch, don't treat the callee as a incoming arg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_23@51438 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 12 years ago
1 changed file(s) with 9 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
29342934 default: assert(0 && "Unknown asm constraint");
29352935 case InlineAsm::isInput: {
29362936 assert(ValueCount >= ResultVals.size() && "Input can't refer to result");
2937 Value *V = CI.getOperand(ValueCount-ResultVals.size());
2937 Value *V = CI.getOperand(ValueCount-ResultVals.size()+1);
29382938 Input.push_back(std::make_pair(C, V));
29392939 break;
29402940 }
29432943 if (ValueCount < ResultVals.size())
29442944 V = ResultVals[ValueCount];
29452945 else
2946 V = std::make_pair(CI.getOperand(ValueCount-ResultVals.size()), -1);
2946 V = std::make_pair(CI.getOperand(ValueCount-ResultVals.size()+1), -1);
29472947 Output.push_back(std::make_pair("="+((I->isEarlyClobber ? "&" : "")+C),
29482948 V));
29492949 break;
29632963 for (unsigned i = 0, e = Output.size(); i != e; ++i) {
29642964 if (i)
29652965 Out << ", ";
2966 Out << "\"" << Output[i].first << "\"(";
2967 writeOperandRaw(Output[i].second.first);
2966 Out << "\"" << Output[i].first << "\"("
2967 << GetValueName(Output[i].second.first);
29682968 if (Output[i].second.second != -1)
29692969 Out << ".field" << Output[i].second.second; // Multiple retvals.
29702970 Out << ")";
29712971 }
29722972 Out << "\n :";
2973 for (std::vector >::iterator I = Input.begin(),
2974 E = Input.end(); I != E; ++I) {
2975 Out << "\"" << I->first << "\"(";
2976 writeOperandRaw(I->second);
2973 for (unsigned i = 0, e = Input.size(); i != e; ++i) {
2974 if (i)
2975 Out << ", ";
2976 Out << "\"" << Input[i].first << "\"(";
2977 writeOperand(Input[i].second);
29772978 Out << ")";
2978 if (I + 1 != E)
2979 Out << ",";
29802979 }
29812980 if (Clobber.size())
29822981 Out << "\n :" << Clobber.substr(1);