Handle the 'e' constraint. Fixes PR3385
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62923 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 4128946..026641c 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -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);
diff --git a/test/Sema/asm.c b/test/Sema/asm.c
index 4093b1a..fa9b125 100644
--- a/test/Sema/asm.c
+++ b/test/Sema/asm.c
@@ -54,3 +54,9 @@
{
asm("nop" : : "X" (8));
}
+
+// PR3385
+void test6(long i)
+{
+ asm("nop" : : "er"(i));
+}
\ No newline at end of file