Add support for the X86 'l' constraint.
authorEric Christopher <echristo@apple.com>
Thu, 7 Jul 2011 22:29:07 +0000 (22:29 +0000)
committerEric Christopher <echristo@apple.com>
Thu, 7 Jul 2011 22:29:07 +0000 (22:29 +0000)
Fixes PR10149 and rdar://9738585

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134648 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/inline-asm.ll

index 4f8b90f76de9e518c254eabc1be4e6ef0bd6795a..01cea3b0a784df3615f2f0e45276228fcc92dd5a 100644 (file)
@@ -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':
index c66d7a8bd11bdb6ad7cc3d70b6037438d6c27e49..603be8aa5604bf04ad542ef89133e328bff42b5c 100644 (file)
@@ -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
+}