Bug ID: 36609
           Summary: ARM inline assembler constant value operand
                    substitution with %c does not work
           Product: tools
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: compile-fail
          Severity: enhancement
          Priority: P
         Component: llc

Created attachment 19999
test case triggering the bug

I have an inline assembly statement which uses '%c' for constant value operand

  asm volatile (".long %c[xfmt] \n\t" : : [xfmt] "i" (&get_3));

This compiles fine with clang for x86 with the following cmdline

  $ clang test.c

However, cross compiling it for ARM with

  $ clang --target=arm-linux-gnueabihf test.c

or using clang natively on an ARM machine results in the following error

  error: invalid operand in inline asm: '.long ${0:c}

I have attached a test case (test.c) and I verified this issue with clang 3.8,
3.9, 4.0 and 5.0.

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to