[LLVMdev] llc generated assembly does not work with gcc 3.4.4

Alexander Herz alexander.herz at mytum.de
Thu Jan 28 01:31:10 PST 2010


Hi,

I tried that before, it produces

    .text
    ALIGN    16
    .globl    _main
_main:                                                      ; @main
; BB#0:                                                     ; %entry
    subl    $20, %esp
    movl    $0, 16(%esp)
    movl    24(%esp), %eax
    movl    %eax, 12(%esp)
    movl    28(%esp), %eax
    movl    %eax, 8(%esp)
    movl    $($_.str), (%esp)
    call    _printf
    movl    16(%esp), %eax
    addl    $20, %esp
    ret
    .data
                                                            ; @.str
$_.str:
    db    "hello world\n\000"

which is not digested by gcc.

Alex

Anton Korobeynikov schrieb:
>> Well, can I enforce gcc compatible output somehow?
>>     
> llc -x86-asm-syntax=att
>
>   


-- 
-------------------------------------------------------
Lehrstuhl I2 Seidl
Sprachen und Beschreibungsstrukturen der Informatik
Institut fuer Informatik
Technische Universitaet Muenchen

Boltzmannstrasse 3  85748 Garching
http://www2.in.tum.de

Telefon: +89 289 181806
Fax: +89 289 18161
------------------------------------------------------- 




More information about the llvm-dev mailing list