[llvm-bugs] [Bug 36609] New: ARM inline assembler constant value operand substitution with %c does not work

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 6 00:40:29 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36609

            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
          Assignee: unassignedbugs at nondot.org
          Reporter: matthias.lange at kernkonzept.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19999
  --> https://bugs.llvm.org/attachment.cgi?id=19999&action=edit
test case triggering the bug

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

  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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180306/8cd0061d/attachment.html>


More information about the llvm-bugs mailing list