[cfe-commits] r70685 - in /cfe/trunk: lib/CodeGen/CGStmt.cpp test/CodeGen/asm.c

Chris Lattner sabre at nondot.org
Sun May 3 02:06:20 PDT 2009


Author: lattner
Date: Sun May  3 04:05:53 2009
New Revision: 70685

URL: http://llvm.org/viewvc/llvm-project?rev=70685&view=rev
Log:
look at the right operand when increasing the size of an asm output,
this fixes http://llvm.org/bugs/show_bug.cgi?id=3373#c20

Modified:
    cfe/trunk/lib/CodeGen/CGStmt.cpp
    cfe/trunk/test/CodeGen/asm.c

Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=70685&r1=70684&r2=70685&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Sun May  3 04:05:53 2009
@@ -848,10 +848,8 @@
         for (InputNo = 0; InputNo != S.getNumInputs(); ++InputNo) {
           TargetInfo::ConstraintInfo &Input = InputConstraintInfos[InputNo];
           if (Input.hasTiedOperand() &&
-              Input.getTiedOperand() == i) {
-            InputNo = i;
+              Input.getTiedOperand() == i)
             break;
-          }
         }
         assert(InputNo != S.getNumInputs() && "Didn't find matching input!");
         

Modified: cfe/trunk/test/CodeGen/asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/asm.c?rev=70685&r1=70684&r2=70685&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/asm.c (original)
+++ cfe/trunk/test/CodeGen/asm.c Sun May  3 04:05:53 2009
@@ -77,6 +77,19 @@
   return output;
 }
 
+struct large {
+  int x[1000];
+};
+
+unsigned long t15(int x, struct large *P) {
+  __asm__("xyz "
+          : "=r" (x)
+          : "m" (*P), "0" (x));
+  return x;
+}
+
+
+
 
 // bitfield destination of an asm.
 struct S {





More information about the cfe-commits mailing list