[cfe-commits] r72764 - in /cfe/trunk: lib/Basic/Targets.cpp test/Sema/asm-x86.c
Eli Friedman
eli.friedman at gmail.com
Wed Jun 3 03:33:17 PDT 2009
Author: efriedma
Date: Wed Jun 3 05:33:05 2009
New Revision: 72764
URL: http://llvm.org/viewvc/llvm-project?rev=72764&view=rev
Log:
PR3678: Add support for "Yt" asm register constraint.
Added:
cfe/trunk/test/Sema/asm-x86.c
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=72764&r1=72763&r2=72764&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed Jun 3 05:33:05 2009
@@ -754,6 +754,13 @@
// instructions.
Info.setAllowsRegister();
return true;
+ case 'Y':
+ ++Name;
+ if (*Name == 't') {
+ Info.setAllowsRegister();
+ return true;
+ }
+ return false;
}
}
Added: cfe/trunk/test/Sema/asm-x86.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/asm-x86.c?rev=72764&view=auto
==============================================================================
--- cfe/trunk/test/Sema/asm-x86.c (added)
+++ cfe/trunk/test/Sema/asm-x86.c Wed Jun 3 05:33:05 2009
@@ -0,0 +1,7 @@
+// RUN: clang-cc %s -triple i386-pc-linux-gnu -target-feature=+sse2 -verify -fsyntax-only
+
+// PR3678
+int test8() {
+ asm("%0" : : "Yt"(1.0));
+ asm("%0" : : "Yy"(1.0)); // expected-error {{invalid input constraint 'Yy' in asm}}
+}
More information about the cfe-commits
mailing list