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: unassignedb...@nondot.org
          Reporter: j...@jms.id.au
                CC: llvm-bugs@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@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@l
EOF


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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to