[llvm-commits] [llvm-gcc-4.2] r43909 - in /llvm-gcc-4.2/trunk/gcc: config/arm/arm.h llvm-convert.cpp
Lauro Ramos Venancio
lauro.venancio at gmail.com
Thu Nov 8 14:10:13 PST 2007
Author: laurov
Date: Thu Nov 8 16:10:12 2007
New Revision: 43909
URL: http://llvm.org/viewvc/llvm-project?rev=43909&view=rev
Log:
Implement the '%@' inline asm ARM extension.
Modified:
llvm-gcc-4.2/trunk/gcc/config/arm/arm.h
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.h?rev=43909&r1=43908&r2=43909&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/arm.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.h Thu Nov 8 16:10:12 2007
@@ -2651,6 +2651,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) += '@'; \
+ }
+
/* LLVM LOCAL end */
#endif /* ! GCC_ARM_H */
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=43909&r1=43908&r2=43909&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Nov 8 16:10:12 2007
@@ -3375,7 +3375,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.
More information about the llvm-commits
mailing list