aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-07-07 22:29:07 +0000
committerEric Christopher <echristo@apple.com>2011-07-07 22:29:07 +0000
commit31b5f00c4ebd870fc2745f1bed86a7b67f802210 (patch)
tree4ba92dcc7b3b2ea242ce2f3c553b8355c84739d4
parent09ad0b6894ae4eab9837970ccd4574681097eb6e (diff)
downloadexternal_llvm-31b5f00c4ebd870fc2745f1bed86a7b67f802210.zip
external_llvm-31b5f00c4ebd870fc2745f1bed86a7b67f802210.tar.gz
external_llvm-31b5f00c4ebd870fc2745f1bed86a7b67f802210.tar.bz2
Add support for the X86 'l' constraint.
Fixes PR10149 and rdar://9738585 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134648 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp1
-rw-r--r--test/CodeGen/X86/inline-asm.ll7
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 4f8b90f..01cea3b 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -12592,6 +12592,7 @@ X86TargetLowering::getConstraintType(const std::string &Constraint) const {
case 'y':
case 'x':
case 'Y':
+ case 'l':
return C_RegisterClass;
case 'a':
case 'b':
diff --git a/test/CodeGen/X86/inline-asm.ll b/test/CodeGen/X86/inline-asm.ll
index c66d7a8..603be8a 100644
--- a/test/CodeGen/X86/inline-asm.ll
+++ b/test/CodeGen/X86/inline-asm.ll
@@ -23,3 +23,10 @@ define void @test4() nounwind {
tail call void asm sideeffect "bork $0", "J"(i32 37) nounwind
ret void
}
+
+; rdar://9738585
+define i32 @test5() nounwind {
+entry:
+ %0 = tail call i32 asm "test", "=l,~{dirflag},~{fpsr},~{flags}"() nounwind
+ ret i32 0
+}