Jim Crafton
2010-Jan-21 20:26 UTC
[LLVMdev] how to compile asm output for x86 with Micorsoft's ML
I was recently trying to compile some bitcode generated like so: llc --x86-asm-syntax=intel test.out it generates a test.out.s file, and while I'm not much of an assembly person, it looks OK. When I feed this to ML ml test.out.s I get tons of errors, most of which appear to be syntax errors. Stuff like: test.out.s(2) : error A2008:syntax error : . error A2008:syntax error : objc_class_name_Fraction etc. Is it possible to generate X86 code that Microsoft's assembler will accept? Is there another option that I missed? I looked around a bit but couldn't find anything. The example on the llvm site mentions being able to compile to C code, but when I try llc -march=c test.out it errors out with: error: invalid target 'c'. Checking the code (I built LLVM 2.7svn) it looks like the C target isn't registered, and llc -version gives me: llc -version Low Level Virtual Machine (http://llvm.org/): llvm version 2.7svn DEBUG build with assertions. Built Jan 20 2010 (14:58:43). Host: i686-pc-win32 Host CPU: core2 Registered Targets: x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 Cheers Jim
Óscar Fuentes
2010-Jan-21 20:35 UTC
[LLVMdev] how to compile asm output for x86 with Micorsoft's ML
Jim Crafton <jim.crafton at gmail.com> writes: [snip]> I looked around a bit but couldn't find anything. The example on the > llvm site mentions being able to compile to C code, but when I try llc > -march=c test.out > > it errors out with: > error: invalid target 'c'.[snip]> Registered Targets: > x86 - 32-bit X86: Pentium-Pro and above > x86-64 - 64-bit X86: EM64T and AMD64By default, the cmake build generates Visual Studio project files for the X86 target only. Take a look at http://www.llvm.org/docs/CMake.html#llvmvars for learning how to build other targets. IIRC, the C target is named CBackend.
Jim Crafton
2010-Jan-21 20:54 UTC
[LLVMdev] how to compile asm output for x86 with Micorsoft's ML
> By default, the cmake build generates Visual Studio project files for > the X86 target only. Take a look at > > http://www.llvm.org/docs/CMake.html#llvmvars > > for learning how to build other targets.OK thanks, I'll look at that. In the meantime, is it possible to get the assembly generated by llc to work wiht ML? That would probably be the ideal solution. Cheers Jim
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