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

Anders Carlsson andersca at mac.com
Tue Aug 4 11:18:52 PDT 2009


Author: andersca
Date: Tue Aug  4 13:18:36 2009
New Revision: 78084

URL: http://llvm.org/viewvc/llvm-project?rev=78084&view=rev
Log:
Revert the fix for PR3800, it broke things.

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

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

==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Tue Aug  4 13:18:36 2009
@@ -909,13 +909,16 @@
     if (Info.isReadWrite()) {
       InOutConstraints += ',';
 
+      const Expr *InputExpr = S.getOutputExpr(i);
+      llvm::Value *Arg = EmitAsmInput(S, Info, InputExpr, InOutConstraints);
+      
       if (Info.allowsRegister())
         InOutConstraints += llvm::utostr(i);
       else
         InOutConstraints += OutputConstraint;
 
-      InOutArgTypes.push_back(Dest.getAddress()->getType());
-      InOutArgs.push_back(Dest.getAddress());
+      InOutArgTypes.push_back(Arg->getType());
+      InOutArgs.push_back(Arg);
     }
   }
   

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

==============================================================================
--- cfe/trunk/test/CodeGen/asm-inout.c (original)
+++ cfe/trunk/test/CodeGen/asm-inout.c Tue Aug  4 13:18:36 2009
@@ -1,8 +1,18 @@
 // RUN: clang-cc -triple i386-unknown-unknown -emit-llvm %s -o %t &&
 // RUN: grep "load i8\*\*\* %p.addr"  %t | count 1
+// XFAIL
 
 // PR3800
 void f(void **p)
 {
     __asm__ volatile("" :"+m"(*p));
 }
+
+#if 0
+// FIXME: Once this works again, we must verify that the code below behaves as expected
+// See PR4677.
+void f() {
+  unsigned _data = 42;
+  __asm__("bswap   %0":"+r"(_data));
+}
+#endif





More information about the cfe-commits mailing list