[llvm-commits] [llvm] r51415 - /llvm/branches/release_23/lib/VMCore/InlineAsm.cpp
Tanya Lattner
tonic at nondot.org
Wed May 21 22:16:47 PDT 2008
Author: tbrethou
Date: Thu May 22 00:16:47 2008
New Revision: 51415
URL: http://llvm.org/viewvc/llvm-project?rev=51415&view=rev
Log:
Merge from mainline.
Fix PR2267, by allowing indirect outputs to be intermixed
with normal outputs. Testcase here:
test/CodeGen/X86/asm-indirect-mem.ll
Modified:
llvm/branches/release_23/lib/VMCore/InlineAsm.cpp
Modified: llvm/branches/release_23/lib/VMCore/InlineAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/lib/VMCore/InlineAsm.cpp?rev=51415&r1=51414&r2=51415&view=diff
==============================================================================
--- llvm/branches/release_23/lib/VMCore/InlineAsm.cpp (original)
+++ llvm/branches/release_23/lib/VMCore/InlineAsm.cpp Thu May 22 00:16:47 2008
@@ -183,15 +183,18 @@
if (Constraints.empty() && !ConstStr.empty()) return false;
unsigned NumOutputs = 0, NumInputs = 0, NumClobbers = 0;
+ unsigned NumIndirect = 0;
for (unsigned i = 0, e = Constraints.size(); i != e; ++i) {
switch (Constraints[i].Type) {
case InlineAsm::isOutput:
+ if ((NumInputs-NumIndirect) != 0 || NumClobbers != 0)
+ return false; // outputs before inputs and clobbers.
if (!Constraints[i].isIndirect) {
- if (NumInputs || NumClobbers) return false; // outputs come first.
++NumOutputs;
break;
}
+ ++NumIndirect;
// FALLTHROUGH for Indirect Outputs.
case InlineAsm::isInput:
if (NumClobbers) return false; // inputs before clobbers.
More information about the llvm-commits
mailing list