[llvm-commits] [llvm] r132598 - in /llvm/trunk: lib/VMCore/InlineAsm.cpp test/CodeGen/ARM/inlineasm3.ll

Eric Christopher echristo at apple.com
Fri Jun 3 15:09:12 PDT 2011


Author: echristo
Date: Fri Jun  3 17:09:12 2011
New Revision: 132598

URL: http://llvm.org/viewvc/llvm-project?rev=132598&view=rev
Log:
Another possible bug. Stopgap until we can autogenerate tables and
constraint lengths.

Part of rdar://9037836 and rdar://9119939


Modified:
    llvm/trunk/lib/VMCore/InlineAsm.cpp
    llvm/trunk/test/CodeGen/ARM/inlineasm3.ll

Modified: llvm/trunk/lib/VMCore/InlineAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/InlineAsm.cpp?rev=132598&r1=132597&r2=132598&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/InlineAsm.cpp (original)
+++ llvm/trunk/lib/VMCore/InlineAsm.cpp Fri Jun  3 17:09:12 2011
@@ -183,12 +183,9 @@
       ++I;
     } else if (*I == '^') {
       // Multi-letter constraint
-      // These will only occur with the existing multiple alternative
-      // constraints and so we can use the isalpha loop below.
-      StringRef::iterator ConStart = ++I;
-      while (I != E && isalpha(*I))
-        ++I;
-      pCodes->push_back(std::string(ConStart, I));
+      // FIXME: For now assuming these are 2-character constraints.
+      pCodes->push_back(std::string(I+1, I+3));
+      I += 3;
     } else {
       // Single letter constraint.
       pCodes->push_back(std::string(I, I+1));

Modified: llvm/trunk/test/CodeGen/ARM/inlineasm3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/inlineasm3.ll?rev=132598&r1=132597&r2=132598&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/inlineasm3.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/inlineasm3.ll Fri Jun  3 17:09:12 2011
@@ -50,3 +50,11 @@
 call void asm sideeffect "flds s15, $0 \0A", "*^Uv,~{s15}"(float* @k.2126) nounwind
 ret i32 0
 }
+
+; Radar 9037836 & 9119939
+
+define i32 @t5() nounwind {
+entry:
+call void asm sideeffect "flds s15, $0 \0A", "*^Uvm,~{s15}"(float* @k.2126) nounwind
+ret i32 0
+}





More information about the llvm-commits mailing list