[cfe-commits] r83939 - in /cfe/trunk: lib/Basic/TargetInfo.cpp test/CodeGen/asm.c test/Sema/vla.c
Chris Lattner
sabre at nondot.org
Mon Oct 12 21:32:07 PDT 2009
Author: lattner
Date: Mon Oct 12 23:32:07 2009
New Revision: 83939
URL: http://llvm.org/viewvc/llvm-project?rev=83939&view=rev
Log:
fix PR4938 by recognizing % as a modifier on outputs,
previously we only recognized it on inputs.
Modified:
cfe/trunk/lib/Basic/TargetInfo.cpp
cfe/trunk/test/CodeGen/asm.c
cfe/trunk/test/Sema/vla.c
Modified: cfe/trunk/lib/Basic/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/TargetInfo.cpp?rev=83939&r1=83938&r2=83939&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/lib/Basic/TargetInfo.cpp Mon Oct 12 23:32:07 2009
@@ -188,6 +188,9 @@
}
case '&': // early clobber.
break;
+ case '%': // commutative.
+ // FIXME: Check that there is a another register after this one.
+ break;
case 'r': // general register.
Info.setAllowsRegister();
break;
Modified: cfe/trunk/test/CodeGen/asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/asm.c?rev=83939&r1=83938&r2=83939&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/asm.c (original)
+++ cfe/trunk/test/CodeGen/asm.c Mon Oct 12 23:32:07 2009
@@ -101,3 +101,12 @@
}
+// PR4938
+int t16() {
+ int a,b;
+ asm ( "nop;"
+ :"=%c" (a)
+ : "r" (b)
+ );
+ return 0;
+}
Modified: cfe/trunk/test/Sema/vla.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/vla.c?rev=83939&r1=83938&r2=83939&view=diff
==============================================================================
(empty)
More information about the cfe-commits
mailing list