[llvm-commits] [llvm-gcc-4.2] r75203 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Bob Wilson bob.wilson at apple.com
Thu Jul 9 17:07:32 PDT 2009


Author: bwilson
Date: Thu Jul  9 19:07:04 2009
New Revision: 75203

URL: http://llvm.org/viewvc/llvm-project?rev=75203&view=rev
Log:
Translate inline assembly constraint 'p' to 'r'.
This fixes pr4521.

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=75203&r1=75202&r2=75203&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Jul  9 19:07:04 2009
@@ -3938,6 +3938,13 @@
       Result += "imr";
       continue;
     }
+
+    // Translate 'p' to 'r'.  This is supposed to check for a valid memory
+    // address, but for inline assembly there is no way to know the mode of
+    // the data being addressed.  Assume that a general register is always
+    // a valid address.
+    if (ConstraintChar == 'p')
+      ConstraintChar = 'r';
   
     // See if this is a regclass constraint.
     unsigned RegClass;





More information about the llvm-commits mailing list