[LLVMbugs] [Bug 11276] New: Linux/ppc asm not understood by GNU as

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 31 04:43:17 PDT 2011


             Bug #: 11276
           Summary: Linux/ppc asm not understood by GNU as
           Product: new-bugs
           Version: 2.9
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ulrik.sverdrup at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 7556
  --> http://llvm.org/bugs/attachment.cgi?id=7556
puts("hello world!")

On linux/ppc llvm 2.9 (using clang) generates assembler in darwin style that
gnu as does not accept. A simple testcase with llvm and gcc output is attached.

It seems to be a simple case of ha16(x) versus  x at ha  and lo16(x) versus x at l 
where the formers are darwin style and latters gnu style. Using corresponding
#defines and preprocessing clang's assembler will enable us to make a
functioning program.

$ clang -v
Debian clang version 2.9-16 (tags/RELEASE_29/final) (based on LLVM 2.9)
Target: powerpc-unknown-linux-gnu

gcc version 4.6.1 (Debian 4.6.1-15)

gcc -std=c99 -S -o simple_gcc.s simple.c

clang -std=c99 -S -o simple_clang.s simple.c

$ clang -std=c99 -c -o simple_clang simple.c
/tmp/cc-jdQ4Dp.s: Assembler messages:
/tmp/cc-jdQ4Dp.s:14: Error: syntax error; found `(', expected `,'
/tmp/cc-jdQ4Dp.s:14: Error: junk at end of line: `(.L.str)'
/tmp/cc-jdQ4Dp.s:15: Error: junk at end of line: `(3)'
clang: error: assembler command failed with exit code 1 (use -v to see

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list