> -----Ursprüngliche Nachricht-----
> Von: asl at math.spbu.ru, LLVM Developers Mailing List <llvmdev at
cs.uiuc.edu>
> Gesendet: 13.06.07 23:13:08
> An: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Betreff: Re: [LLVMdev] LLVM binaries for Windows and more
>
> Hello, Andreas.
>
> > It seems that the generated ASM code cannot be assembled with GCC
(wrong output format I guess).
> Yes, it seems, that intel-style assembler is emitted.
>
> > Maybe this fails because it calls the MingW gcc.exe and not
llvm-gcc.exe?
> No. LLVM autodetects platform you're running tools on. So, the problem
> actually is that you're trying to "mix" binaries built with
microsoft
> tools with gcc. The first will force LLVM tools to emit intel-style
> assembler (in fact, masm-dialect), but second will assume, that you're
> providing AT&T style assembler on input.
>
> Possible solutions:
> 1. Either build LLVM with gcc on mingw32 platform
> 2. Select assembler flavour "by hands" (look into llc --help to
find,
> how to do this)
I tried solution 2 and it works! Thank you!
> 3. Implement necessary functionality in llvm-ld (calling microsoft
> tools, if intel-style assembler is emitted).
>
> > However, is the name "a.out.s" a bug?
> No.
>
Ok, but it remains strange :-).
> > Is it planed to include binary writers?
> Maybe. Patches are welcome :) In fact, there are MachO and ELF writers.
> Both misses many important things.
>
> > (So that the step to go through an external assembler wouldn't be
necessary.)
> This isn't totally right: consider you have the source with inline
> assembler.
>
Hm, either the assembler parser could be integrated (GCC seems to be doing this
with cryptic ways to specify which registers get changed :-) or only those files
could be assembled by an external assembler. Am I the only one who thinks
emitting huge ASM files is a bad idea for compile-time performance?
Targetting LLVM as a backend currently seems to imply the following
"pipeline":
Programming language (needs to be parsed) --> LLVM code (textual; needs to be
parsed) --> Assembler (textual; needs to be parsed) --> Executable
I don't want to be offensive here; just curious how you see it. (Yes, I know
one could output LLVM's bitcode directly. However, I wouldn't dare;
probably for the same reasons LLVM does output textual assembly.)
Thanks again,
Andreas
_________________________________________________________________________
In 5 Schritten zur eigenen Homepage. Jetzt Domain sichern und gestalten!
Nur 3,99 EUR/Monat! http://www.maildomain.web.de/?mc=021114