We are already generating object directly. It is on my roadmap to implement the standalone assembler, but I was hoping for some suggestions ;-) My target is Mips and I have started looking at what ARM does. If there is a better model or how-to guide I'd like to know. Thanks, Jack ________________________________ From: Owen Anderson [resistor at mac.com] Sent: Wednesday, January 11, 2012 6:40 PM To: Carter, Jack Cc: List Subject: Re: [LLVMdev] llvm-mc standalone assemblers and testing On Jan 11, 2012, at 6:05 PM, Carter, Jack wrote: I have had references to llvm-mc in terms of a tester for MC level code changes and have just found and read the blog http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html. Am I correct that lib/Target/<target>/AsmParser/*.cpp needs to be completed to make a standalone assembler for a specific target and until that is done, llvm-mc can't be used to generate output object that is tested by elf-dump? You need to implement an AsmParser if you want to generate object files from assembly files. You can generate object files from higher-level inputs (.c, .ll) without a functional AsmParser as long as your inputs don't use inline assembly. --Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/17f00a34/attachment.html>
ARM is the best model currently, though x86 does some interesting things as well and is worth looking at. If there's anything in particular that's causing head-scratching, just ask. There's not much available in terms of how-to documentation, unfortunately. That's definitely on my TODO list to write, but time constraints are rough right now. -Jim On Jan 11, 2012, at 8:09 PM, Carter, Jack wrote:> We are already generating object directly. > > It is on my roadmap to implement the standalone assembler, but I was hoping for some suggestions ;-) > > My target is Mips and I have started looking at what ARM does. If there is a better model or how-to guide I'd like to know. > > Thanks, > > Jack > From: Owen Anderson [resistor at mac.com] > Sent: Wednesday, January 11, 2012 6:40 PM > To: Carter, Jack > Cc: List > Subject: Re: [LLVMdev] llvm-mc standalone assemblers and testing > > > On Jan 11, 2012, at 6:05 PM, Carter, Jack wrote: > >> I have had references to llvm-mc in terms of a tester for MC level code changes and have just found and read the blog http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html. >> >> Am I correct that lib/Target/<target>/AsmParser/*.cpp needs to be completed to make a standalone assembler for a specific target and until that is done, llvm-mc can't be used to generate output object that is tested by elf-dump? > > You need to implement an AsmParser if you want to generate object files from assembly files. You can generate object files from higher-level inputs (.c, .ll) without a functional AsmParser as long as your inputs don't use inline assembly. > > --Owen > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/bda23b20/attachment.html>
Jim, What I am doing is modeling from ARM and X86 just enough to get "hello world" to produce correct ELF output.>From many years of experience I know this will leave me with little understanding of what is going on and I will need to have this understanding to really add long term value. Maybe my questions will help frame the how-to-and-why documentation.I think my first patch will include a link from llvm-mc references in CodeGenerator.html pointing to the llvm project blog that discusses what it is trying to do. Cheers, Jack ________________________________ From: Jim Grosbach [grosbach at apple.com] Sent: Thursday, January 12, 2012 10:51 AM To: Carter, Jack Cc: Owen Anderson; List Subject: Re: [LLVMdev] llvm-mc standalone assemblers and testing ARM is the best model currently, though x86 does some interesting things as well and is worth looking at. If there's anything in particular that's causing head-scratching, just ask. There's not much available in terms of how-to documentation, unfortunately. That's definitely on my TODO list to write, but time constraints are rough right now. -Jim On Jan 11, 2012, at 8:09 PM, Carter, Jack wrote: We are already generating object directly. It is on my roadmap to implement the standalone assembler, but I was hoping for some suggestions ;-) My target is Mips and I have started looking at what ARM does. If there is a better model or how-to guide I'd like to know. Thanks, Jack ________________________________ From: Owen Anderson [resistor at mac.com<mailto:resistor at mac.com>] Sent: Wednesday, January 11, 2012 6:40 PM To: Carter, Jack Cc: List Subject: Re: [LLVMdev] llvm-mc standalone assemblers and testing On Jan 11, 2012, at 6:05 PM, Carter, Jack wrote: I have had references to llvm-mc in terms of a tester for MC level code changes and have just found and read the blog http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html. Am I correct that lib/Target/<target>/AsmParser/*.cpp needs to be completed to make a standalone assembler for a specific target and until that is done, llvm-mc can't be used to generate output object that is tested by elf-dump? You need to implement an AsmParser if you want to generate object files from assembly files. You can generate object files from higher-level inputs (.c, .ll) without a functional AsmParser as long as your inputs don't use inline assembly. --Owen _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120113/fccfbe27/attachment.html>
Possibly Parallel Threads
- [LLVMdev] llvm-mc standalone assemblers and testing
- [LLVMdev] llvm-mc standalone assemblers and testing
- [LLVMdev] llvm-mc standalone assemblers and testing
- [LLVMdev] llvm-mc standalone assemblers and testing
- [LLVMdev] (MC) Register parsing for AsmParser (standalone assembler)