[cfe-commits] r62923 - in /cfe/trunk: lib/Basic/Targets.cpp test/Sema/asm.c

Anders Carlsson andersca at mac.com
Sat Jan 24 10:03:09 PST 2009


Author: andersca
Date: Sat Jan 24 12:03:09 2009
New Revision: 62923

URL: http://llvm.org/viewvc/llvm-project?rev=62923&view=rev
Log:
Handle the 'e' constraint. Fixes PR3385

Modified:
    cfe/trunk/lib/Basic/Targets.cpp
    cfe/trunk/test/Sema/asm.c

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=62923&r1=62922&r2=62923&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Sat Jan 24 12:03:09 2009
@@ -505,8 +505,10 @@
   case 'y': // Any MMX register.
   case 'x': // Any SSE register.
   case 'Q': // Any register accessible as [r]h: a, b, c, and d.
-  case 'Z': // 32-bit integer constant for use with zero-extending x86_64
-            // instructions.
+  case 'e': // 32-bit signed integer constant for use with zero-extending 
+            // x86_64 instructions.
+  case 'Z': // 32-bit unsigned integer constant for use with zero-extending 
+            // x86_64 instructions.
   case 'N': // unsigned 8-bit integer constant for use with in and out
             // instructions.
     info = (TargetInfo::ConstraintInfo)(info|TargetInfo::CI_AllowsRegister);

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

==============================================================================
--- cfe/trunk/test/Sema/asm.c (original)
+++ cfe/trunk/test/Sema/asm.c Sat Jan 24 12:03:09 2009
@@ -54,3 +54,9 @@
 {
   asm("nop" : : "X" (8)); 
 }
+
+// PR3385
+void test6(long i)
+{
+  asm("nop" : : "er"(i));
+}
\ No newline at end of file





More information about the cfe-commits mailing list