Warning
This is a work in progress. If you would like to contribution, please push updates and patches to the main github project available at http://github.com/Jonathan2251/lbd for review.
Table of Contents¶
- About
- Cpu0 Instruction Set and LLVM Target Description
- Backend structure
- Adding arithmetic and local pointer support
- Generating object files
- Global variables, structs and arrays, other type
- Control flow statements
- Function call
- Mips stack frame
- Load incoming arguments from stack frame
- Store outgoing arguments to stack frame
- Fix the wrong offset in storing arguments to stack frame
- Pseudo hook instruction ADJCALLSTACKDOWN and ADJCALLSTACKUP
- Handle $gp register in PIC addressing mode
- Variable number of arguments
- Correct the return of main()
- Verify DIV for operator %
- Structure type support
- Summary of this chapter
- ELF Support
- Run backend
- Backend Optimization
- Appendix A: Getting Started: Installing LLVM and the Cpu0 example code
- Appendix B: LLVM changes
- Appendix C: instructions discuss
- Todo List
Book example code¶
The example code is available in:
http://jonathan2251.github.com/lbd/LLVMBackendTutorialExampleCode.tar.gz