[cfe-dev] clang assembler problems

John Myers atomicdog.jwm at gmail.com
Thu Feb 11 01:33:34 PST 2010


On 2/10/10, kalyan ponnala <ponnala.kalyan at gmail.com> wrote:
> It gives the output as given in this snapshot. It still connects to mingw
> but the assembler cant figure out these statements i guess. It is giving
> errors as shown in the snapshot. Do you know why is it doing this?
>
> Thanks

Without the target triple it produces different directives for align and DB.

C:\_projects_\build-all-llvm\bin\Debug>clang.exe -v -S -o - helloworld.c
clang version 1.1 (trunk)
Target: i686-pc-win32
Thread model: posix
 "C:/_projects_/build-all-llvm/bin/Debug/clang.exe" -cc1 -triple
i686-pc-win32 -S -disable-free -main-file-name helloworld.c
-mrelocation-model static
 -mdisable-fp-elim -v -resource-dir
C:/_projects_/build-all-llvm/bin/lib/clang/1.1 -fmessage-length 150
-fms-extensions -fgnu-runtime -fdiagnostics-sh
ow-option -fcolor-diagnostics -o - -x c helloworld.c
clang -cc1 version 1.1 based upon llvm 2.7svn hosted on i686-pc-win32
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 C:/_projects_/build-all-llvm/bin/lib/clang/1.1/include
 C:\Program Files\Microsoft Visual Studio 9.0\VC\include
 C:\Program Files\Microsoft SDKs\Windows\v6.0A
End of search list.
        .text
        .globl  _main
        ALIGN   16
_main:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        movl    $0, -4(%ebp)
        movl    %esp, %eax
        movl    $($_.str), (%eax)
        call    _printf
        movl    $0, -4(%ebp)
        movl    -4(%ebp), %eax
        addl    $8, %esp
        popl    %ebp
        ret

        .data
$_.str:
        db       "\n hello world\000"


C:\_projects_\build-all-llvm\bin\Debug>clang.exe -Xclang
-triple=i686-pc-mingw32 -v -S -o - helloworld.c
clang version 1.1 (trunk)
Target: i686-pc-win32
Thread model: posix
 "C:/_projects_/build-all-llvm/bin/Debug/clang.exe" -cc1 -triple
i686-pc-win32 -S -disable-free -main-file-name helloworld.c
-mrelocation-model sta
 -mdisable-fp-elim -v -resource-dir
C:/_projects_/build-all-llvm/bin/lib/clang/1.1 -fmessage-length 150
-fms-extensions -fgnu-runtime -fdiagnostics
ow-option -fcolor-diagnostics -triple=i686-pc-mingw32 -o - -x c helloworld.c
clang -cc1 version 1.1 based upon llvm 2.7svn hosted on i686-pc-win32
ignoring nonexistent directory "c:/mingw/include"
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 C:/_projects_/build-all-llvm/bin/lib/clang/1.1/include
End of search list.
        .def     _main; .scl    2;      .type   32;     .endef
        .text
        .globl  _main
        .align  16
_main:
        pushl   %ebp
        movl    %esp, %ebp



More information about the cfe-dev mailing list