Jim Crafton
2010-Jan-21 22:01 UTC
[LLVMdev] how to compile asm output for x86 with Micorsoft's ML
> Nope, llvm's .s output is only compatible with GAS and other at&t syntax > assemblers. It turns out that MASM syntax is highly ambiguous and MASM is > not production quality for use by a compiler. This is why visual studio > doesn't go through it. Long term, we'd like LLVM to be able to write out .o > files directly, if you're interested in adding PECOFF support, that would be > very nice :)Crapola. I was afraid that was going to be the case. This was originally something to do to have fun playing with Objective C, I'm not sure PECOFF support would fall under that :) Any idea how nasty that would be? Oh well, I guess the idea of doing this on windows isn't going to happen anytime soon. Cheers Jim> > -Chris >
Chris Lattner
2010-Jan-21 22:56 UTC
[LLVMdev] how to compile asm output for x86 with Micorsoft's ML
On Jan 21, 2010, at 2:01 PM, Jim Crafton wrote:>> Nope, llvm's .s output is only compatible with GAS and other at&t >> syntax >> assemblers. It turns out that MASM syntax is highly ambiguous and >> MASM is >> not production quality for use by a compiler. This is why visual >> studio >> doesn't go through it. Long term, we'd like LLVM to be able to >> write out .o >> files directly, if you're interested in adding PECOFF support, that >> would be >> very nice :) > > Crapola. I was afraid that was going to be the case. This was > originally something to do to have fun playing with Objective C, I'm > not sure PECOFF support would fall under that :) Any idea how nasty > that would be? > Oh well, I guess the idea of doing this on windows isn't going to > happen anytime soon.Why not just install the cygwin assembler? -Chris
罗勇刚(Yonggang Luo)
2010-Jan-22 03:20 UTC
[LLVMdev] how to compile asm output for x86 with Micorsoft's ML
Did pecoff support means we can linkage llvm generated obj files to msvc's obj files? 2010/1/22, Jim Crafton <jim.crafton at gmail.com>:>> Nope, llvm's .s output is only compatible with GAS and other at&t syntax >> assemblers. It turns out that MASM syntax is highly ambiguous and MASM is >> not production quality for use by a compiler. This is why visual studio >> doesn't go through it. Long term, we'd like LLVM to be able to write out >> .o >> files directly, if you're interested in adding PECOFF support, that would >> be >> very nice :) > > Crapola. I was afraid that was going to be the case. This was > originally something to do to have fun playing with Objective C, I'm > not sure PECOFF support would fall under that :) Any idea how nasty > that would be? > Oh well, I guess the idea of doing this on windows isn't going to > happen anytime soon. > > > Cheers > > Jim > > >> >> -Chris >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- 从我的移动设备发送 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo
Jim Crafton
2010-Jan-22 14:09 UTC
[LLVMdev] how to compile asm output for x86 with Micorsoft's ML
It would be nice to be able to use clang/llvm without GNU toolchain dependencies. Just out of curioisty what does the --x86-asm-syntax=intel actually mean then? Does this not get used? Is this a different syntax than the AT&T variety (forgive me if this is an obvious question)? I tried downloading FASM last night and it seemed handle some of the output, the one thing it didn't like was the string variable. It complained about mov DWORD PTR [ESP], ($_.str) something about "$_.str" wasn't kosher. On Thu, Jan 21, 2010 at 5:56 PM, Chris Lattner <clattner at apple.com> wrote:> > On Jan 21, 2010, at 2:01 PM, Jim Crafton wrote: > >>> Nope, llvm's .s output is only compatible with GAS and other at&t syntax >>> assemblers. It turns out that MASM syntax is highly ambiguous and MASM >>> is >>> not production quality for use by a compiler. This is why visual studio >>> doesn't go through it. Long term, we'd like LLVM to be able to write out >>> .o >>> files directly, if you're interested in adding PECOFF support, that would >>> be >>> very nice :)Regarding the pecoff support - FASM comes with complete source and what appears to be a BSD license. It outputs to pecoff. Assuming the FASM code is readable and reasonably understandable, could this code be used as a starting point for adding pecoff support? Isn't it the case that when llvm gets to this phase, all the optimizations have been done, everything else is complete, the only thing left is just outputting to assembly or some other format right? Perhaps I'm being hopelessly optimistic, but if that were the case that doesn't sound like it would be that hard. Of course what do I know? :) Cheers Jim
Anton Korobeynikov
2010-Jan-22 14:34 UTC
[LLVMdev] how to compile asm output for x86 with Micorsoft's ML
> Did pecoff support means we can linkage llvm generated obj files to > msvc's obj files?You can do this right now. Object file format is fully compatible. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Maybe Matching Threads
- [LLVMdev] how to compile asm output for x86 with Micorsoft's ML
- [LLVMdev] how to compile asm output for x86 with Micorsoft's ML
- [LLVMdev] how to compile asm output for x86 with Micorsoft's ML
- [LLVMdev] how to compile asm output for x86 with Micorsoft's ML
- [LLVMdev] how to compile asm output for x86 with Micorsoft's ML