[llvm-commits] [llvm-gcc-4.2] r43909 - in /llvm-gcc-4.2/trunk/gcc: config/arm/arm.h llvm-convert.cpp
Chris Lattner
clattner at apple.com
Thu Nov 8 14:19:15 PST 2007
On Nov 8, 2007, at 2:10 PM, Lauro Ramos Venancio wrote:
> 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.
Hey Lauro,
in .td files, you can use "${:comment}" to print the comment
character, does this work in inline asm? If so, that might be a
better thing to transform into. See AsmPrinter::PrintSpecial for the
code that does this,
-Chris
>
> 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.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list