[llvm-bugs] [Bug 38945] New: Assembler does not understand symbol used as operand

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 13 19:21:24 PDT 2018


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

            Bug ID: 38945
           Summary: Assembler does not understand symbol used as operand
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: joel at jms.id.au
                CC: llvm-bugs at lists.llvm.org

Created attachment 20880
  --> https://bugs.llvm.org/attachment.cgi?id=20880&action=edit
example

When building the powerpc Linux kernel, clang trips up on
arch/powerpc/boot/crt0.S:

       cmpdi   r12,RELACOUNT at l

Enclosing the RELACOUNT with () allows it to work. binutils does not require
this, so clang will not work with a bunch of existing code. It would be nice if
clang supported the same syntax.

A simple example, built with clang trunk:

cat << EOF > t.S
NUMBER = 0x6ffffff9

        .text
.globl  main
main:
        cmpwi        8,NUMBER at l
EOF


$ clang-8 -target powerpc64le-linux-gnu t.S 
t.S:6:18: error: unexpected modifier on variable reference
 cmpwi 8,NUMBER at l
                 ^
t.S:6:10: error: unknown operand
 cmpwi 8,NUMBER at l
         ^

-- 
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/20180914/46b8c6a0/attachment.html>


More information about the llvm-bugs mailing list