Prakash Premkumar
2014-Sep-09 06:09 UTC
[LLVMdev] Machine Code for different architectures
How does LLVM generate machine code for different architectures? For example, the machine code for x86 and amd will vary. How does LLVM convert its IR to machine code for different architectures.Can you please explain the approach? Is it just write two different programs for two different architectures and pass a flag to the compiler based on which machine code you want to generate? Thanks a lot for your explanations. Thanks Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140909/bbb3937f/attachment.html>
http://llvm.org/docs/WritingAnLLVMBackend.html On Tue, Sep 9, 2014 at 6:09 PM, Prakash Premkumar <prakash.prax at gmail.com> wrote:> How does LLVM generate machine code for different architectures? > For example, the machine code for x86 and amd will vary. > > How does LLVM convert its IR to machine code for different > architectures.Can you please explain the approach? Is it just write two > different programs for two different architectures and pass a flag to the > compiler based on which machine code you want to generate? > > Thanks a lot for your explanations. > > Thanks > Prakash > > _______________________________________________ > 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/20140909/0be95eaa/attachment.html>
Hi, We have some DSP architectures (kalimba) which have 24-bits as their "minimum addressable unit". So this means that the sizeof a char (and an int and a short for that matter) is 24-bits. I quickly read the posted link WritingAnLLVMBackend.html but did not see an obvious answer to the following question: Is it possible to write a backend that faithfully represents these architectures or is sizeof_byte==8 bits baked into to llvm? Does anyone have any views on the above? thanks Matthew Gardiner On Tue, 9 Sep 2014 18:21:01 +1200 Bruce Hoult <bruce at hoult.org> wrote:> http://llvm.org/docs/WritingAnLLVMBackend.html > > > On Tue, Sep 9, 2014 at 6:09 PM, Prakash Premkumar > <prakash.prax at gmail.com> wrote: > > > How does LLVM generate machine code for different architectures? > > For example, the machine code for x86 and amd will vary. > > > > How does LLVM convert its IR to machine code for different > > architectures.Can you please explain the approach? Is it just write > > two different programs for two different architectures and pass a > > flag to the compiler based on which machine code you want to > > generate? > > > > Thanks a lot for your explanations. > > > > Thanks > > Prakash > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > > > To report this email as spam click > https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ== .Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc. New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.
Maybe Matching Threads
- [LLVMdev] Machine Code for different architectures
- [LLVMdev] Machine Code for different architectures
- [LLVMdev] Machine Code for different architectures
- [LLVMdev] [PATCH][REQUEST] Could someone submit this CSR Kalimba definitions patch please?
- [LLVMdev] [PATCH][REQUEST] Could someone submit this CSR Kalimba definitions patch please?