http://llvm.org/bugs/show_bug.cgi?id=11276

             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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    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@ha  and lo16(x) versus x@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
invocation)

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to