Author: laurov
Date: Mon Nov 19 14:49:31 2007
New Revision: 44241

URL: http://llvm.org/viewvc/llvm-project?rev=44241&view=rev
Log:
ARM: Implement the '%@' inline asm extension.


Modified:
    llvm-gcc-4.0/trunk/gcc/config/arm/arm.h
    llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.0/trunk/gcc/config/arm/arm.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/config/arm/arm.h?rev=44241&r1=44240&r2=44241&view=diff

==============================================================================
--- llvm-gcc-4.0/trunk/gcc/config/arm/arm.h (original)
+++ llvm-gcc-4.0/trunk/gcc/config/arm/arm.h Mon Nov 19 14:49:31 2007
@@ -2925,6 +2925,15 @@
 
 /* Doing struct copy by partial-word loads and stores is not a good idea on 
ARM. */
 #define TARGET_LLVM_MIN_BYTES_COPY_BY_MEMCPY 4
+
+/* These are a couple of extensions to the asm formats
+     %@ prints out ASM_COMMENT_START
+     TODO: %r prints out REGISTER_PREFIX reg_names[arg]  */
+#define LLVM_ASM_EXTENSIONS(ESCAPED_CHAR, ASM, RESULT) \
+  else if ((ESCAPED_CHAR) == '@') {                    \
+    (RESULT) += ASM_COMMENT_START;                      \
+  }
+
 /* APPLE LOCAL end llvm */
 
 #endif /* ! GCC_ARM_H */

Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp?rev=44241&r1=44240&r2=44241&view=diff

==============================================================================
--- llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Mon Nov 19 14:49:31 2007
@@ -3831,7 +3831,11 @@
         Result += '%';
       } else if (EscapedChar == '=') {     // Unique ID for the asm instance.
         Result += utostr(InlineAsmNum);
-      } else if (ISALPHA(EscapedChar)) {
+      }
+#ifdef LLVM_ASM_EXTENSIONS
+      LLVM_ASM_EXTENSIONS(EscapedChar, InStr, Result)
+#endif
+      else if (ISALPHA(EscapedChar)) {
         // % followed by a letter and some digits. This outputs an operand in a
         // special way depending on the letter.  We turn this into LLVM ${N:o}
         // syntax.


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to