├── source ├── _static │ └── dummy ├── _templates │ └── layout.html └── todo.rst ├── code_fragment ├── backendstructure │ ├── 24.txt │ ├── 17.txt │ ├── 13.txt │ ├── 16.txt │ ├── 18.txt │ ├── 20.txt │ ├── 14.txt │ ├── 19.txt │ ├── 8.txt │ ├── 3.txt │ ├── 11.txt │ ├── 15.txt │ ├── 9.txt │ ├── 2.txt │ ├── 23.txt │ ├── 10.txt │ ├── 22.txt │ ├── 6.txt │ └── 21.txt └── llvmstructure │ ├── 15.txt │ ├── 5.txt │ ├── 13.txt │ ├── 2.txt │ ├── 12.txt │ ├── 14.txt │ ├── 8.txt │ └── 1.txt ├── Fig ├── funccall │ ├── 1.png │ └── 2.png ├── globalvar │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png ├── install │ ├── 1.png │ ├── 10.png │ ├── 11.png │ ├── 12.png │ ├── 13.png │ ├── 14.png │ ├── 15.png │ ├── 16.png │ ├── 17.png │ ├── 18.png │ ├── 19.png │ ├── 2.png │ ├── 20.png │ ├── 21.png │ ├── 22.png │ ├── 23.png │ ├── 24.png │ ├── 25.png │ ├── 26.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ ├── 8.png │ └── 9.png ├── otherinst │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ ├── 8.png │ ├── 9.png │ └── 10.png ├── llvmstructure │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ └── 8.png ├── Author_ChineseName.png └── backendstructure │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ ├── 8.png │ └── 9.png ├── Table ├── funccall │ └── 1.png └── llvmstructure │ ├── 1.png │ ├── 2.png │ └── 3.png ├── terminal_io ├── backendstructure │ ├── 1.txt │ ├── 3.txt │ ├── 6.txt │ ├── 5.txt │ ├── 4.txt │ ├── 7.txt │ └── 2.txt └── llvmstructure │ ├── 5.txt │ ├── 2.txt │ ├── 3.txt │ ├── 6.txt │ ├── 4.txt │ ├── 7.txt │ └── 1.txt └── LLVMBackendTutorialExampleCode ├── 2 └── Cpu0 │ ├── MCTargetDesc │ ├── CMakeLists.txt │ └── Makefile │ ├── TargetInfo │ ├── CMakeLists.txt │ ├── Makefile │ └── LLVMBuild.txt │ └── Cpu0TargetMachine.cpp ├── 3 ├── 1 │ └── Cpu0 │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── Cpu0InstrInfo.cpp │ │ └── Cpu0SelectionDAGInfo.cpp ├── 2 │ └── Cpu0 │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ └── Cpu0SelectionDAGInfo.cpp ├── 3 │ └── Cpu0 │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ └── Cpu0SelectionDAGInfo.cpp ├── 4 │ ├── Cpu0 │ │ ├── MCTargetDesc │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ ├── TargetInfo │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ └── LLVMBuild.txt │ │ └── Cpu0SelectionDAGInfo.cpp │ └── errormessage.txt └── 5 │ └── Cpu0 │ ├── MCTargetDesc │ ├── CMakeLists.txt │ └── Makefile │ ├── TargetInfo │ ├── CMakeLists.txt │ ├── Makefile │ └── LLVMBuild.txt │ ├── InstPrinter │ ├── CMakeLists.txt │ ├── Makefile │ └── LLVMBuild.txt │ └── Cpu0SelectionDAGInfo.cpp ├── 4 ├── 1 │ └── Cpu0 │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ └── Cpu0SelectionDAGInfo.cpp └── 2 │ └── Cpu0 │ ├── TargetInfo │ ├── CMakeLists.txt │ ├── Makefile │ └── LLVMBuild.txt │ ├── InstPrinter │ ├── CMakeLists.txt │ ├── Makefile │ └── LLVMBuild.txt │ ├── MCTargetDesc │ ├── CMakeLists.txt │ └── Makefile │ └── Cpu0SelectionDAGInfo.cpp ├── 5 ├── 1 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ └── Cpu0SelectionDAGInfo.cpp ├── 2 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ └── Cpu0SelectionDAGInfo.cpp ├── 3 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ └── Cpu0SelectionDAGInfo.cpp ├── 5 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ └── Cpu0SelectionDAGInfo.cpp ├── other │ ├── 8 │ │ └── Cpu0 │ │ │ ├── TargetInfo │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ ├── InstPrinter │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ └── MCTargetDesc │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ ├── 9 │ │ └── Cpu0 │ │ │ ├── TargetInfo │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ ├── InstPrinter │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ └── MCTargetDesc │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ ├── 5_gVarNotWorkYet │ │ └── Cpu0 │ │ │ ├── MCTargetDesc │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ ├── TargetInfo │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ └── InstPrinter │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ ├── 7.1 │ │ └── Cpu0 │ │ │ ├── TargetInfo │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ ├── InstPrinter │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ └── MCTargetDesc │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ ├── 7.2 │ │ └── Cpu0 │ │ │ ├── TargetInfo │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ ├── InstPrinter │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ │ └── MCTargetDesc │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ └── 6_Frame │ │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ └── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile ├── 5_2 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ └── Cpu0SelectionDAGInfo.cpp ├── 6_1 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ └── Cpu0SelectionDAGInfo.cpp └── 6_2 │ └── Cpu0 │ ├── TargetInfo │ ├── CMakeLists.txt │ ├── Makefile │ └── LLVMBuild.txt │ ├── InstPrinter │ ├── CMakeLists.txt │ ├── Makefile │ └── LLVMBuild.txt │ └── MCTargetDesc │ ├── CMakeLists.txt │ └── Makefile ├── 6 └── 1 │ └── Cpu0 │ ├── TargetInfo │ ├── CMakeLists.txt │ ├── Makefile │ └── LLVMBuild.txt │ ├── InstPrinter │ ├── CMakeLists.txt │ ├── Makefile │ └── LLVMBuild.txt │ └── MCTargetDesc │ ├── CMakeLists.txt │ └── Makefile ├── 7 ├── 2 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ └── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile ├── 3 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ └── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile ├── 4 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ └── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile ├── 5 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ └── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile ├── 8 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ └── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile ├── 9 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile │ │ └── Disassembler │ │ ├── CMakeLists.txt │ │ └── Makefile ├── 4_3 │ └── Cpu0 │ │ ├── TargetInfo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ ├── InstPrinter │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── LLVMBuild.txt │ │ └── MCTargetDesc │ │ ├── CMakeLists.txt │ │ └── Makefile └── 1_frame │ └── Cpu0 │ ├── TargetInfo │ ├── CMakeLists.txt │ └── Makefile │ ├── InstPrinter │ ├── CMakeLists.txt │ └── Makefile │ └── MCTargetDesc │ ├── CMakeLists.txt │ └── Makefile └── InputFiles ├── ch3.bc ├── ch4_2.bc ├── ch5_1.bc ├── ch5_2.bc ├── ch5_3.bc ├── ch5_6.bc ├── ch7_1.bc ├── ch4_2.cpu0.o ├── ch5_1.cpu0.o ├── ch5_5_1.bc ├── ch5_5_2.bc ├── ch5_5_3.bc ├── ch6_1_1.bc ├── ch6_1_2.bc ├── ch6_1_3.bc ├── ch7_1.cpu0.o ├── ch7_1.mips.o ├── ch7_1_4.bc ├── ch5_5_1.cpu0.o ├── ch6_1_1.cpu0.o ├── ch6_1_2.cpu0.o ├── ch6_1_3.cpu0.o ├── ch_test_8_1.bc ├── ch_test_8_1.mips.o ├── ch5_5_2.cpp ├── ch5_3.cpp ├── ch6_1_4.cpp ├── ch5_6.cpp ├── ch7_1_3.cpp ├── ch5_5_1.cpp ├── ch4_1.cpp ├── ch7_1_2.cpp ├── ch3.cpp ├── ch5_6_2.cpp ├── ch3.cpu0.s ├── ch6_1_2.cpp ├── ch_test_8_1.cpp ├── ch7_1.cpp ├── ch5_5_2.cpu0.s ├── ch7_2.cpp ├── ch_test_8_2.cpp ├── ch5_5_3.cpp ├── ch4_2_printf.cpp ├── ch5_3.cpu0.s ├── ch_test_8_1.mips.s └── ch7_1_4.cpp /source/_static/dummy: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/24.txt: -------------------------------------------------------------------------------- 1 | addiu $sp, $sp, -8 2 | -------------------------------------------------------------------------------- /source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | -------------------------------------------------------------------------------- /source/todo.rst: -------------------------------------------------------------------------------- 1 | Todo List 2 | ========= 3 | 4 | .. todolist:: 5 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/17.txt: -------------------------------------------------------------------------------- 1 | %e = fmadd %a, %c, %b 2 | ... 3 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/13.txt: -------------------------------------------------------------------------------- 1 | a = b + c 2 | d = a – d 3 | c = d + c 4 | -------------------------------------------------------------------------------- /Fig/funccall/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/funccall/1.png -------------------------------------------------------------------------------- /Fig/funccall/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/funccall/2.png -------------------------------------------------------------------------------- /Fig/globalvar/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/globalvar/1.png -------------------------------------------------------------------------------- /Fig/globalvar/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/globalvar/2.png -------------------------------------------------------------------------------- /Fig/globalvar/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/globalvar/3.png -------------------------------------------------------------------------------- /Fig/globalvar/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/globalvar/4.png -------------------------------------------------------------------------------- /Fig/install/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/1.png -------------------------------------------------------------------------------- /Fig/install/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/10.png -------------------------------------------------------------------------------- /Fig/install/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/11.png -------------------------------------------------------------------------------- /Fig/install/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/12.png -------------------------------------------------------------------------------- /Fig/install/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/13.png -------------------------------------------------------------------------------- /Fig/install/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/14.png -------------------------------------------------------------------------------- /Fig/install/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/15.png -------------------------------------------------------------------------------- /Fig/install/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/16.png -------------------------------------------------------------------------------- /Fig/install/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/17.png -------------------------------------------------------------------------------- /Fig/install/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/18.png -------------------------------------------------------------------------------- /Fig/install/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/19.png -------------------------------------------------------------------------------- /Fig/install/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/2.png -------------------------------------------------------------------------------- /Fig/install/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/20.png -------------------------------------------------------------------------------- /Fig/install/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/21.png -------------------------------------------------------------------------------- /Fig/install/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/22.png -------------------------------------------------------------------------------- /Fig/install/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/23.png -------------------------------------------------------------------------------- /Fig/install/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/24.png -------------------------------------------------------------------------------- /Fig/install/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/25.png -------------------------------------------------------------------------------- /Fig/install/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/26.png -------------------------------------------------------------------------------- /Fig/install/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/3.png -------------------------------------------------------------------------------- /Fig/install/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/4.png -------------------------------------------------------------------------------- /Fig/install/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/5.png -------------------------------------------------------------------------------- /Fig/install/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/6.png -------------------------------------------------------------------------------- /Fig/install/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/7.png -------------------------------------------------------------------------------- /Fig/install/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/8.png -------------------------------------------------------------------------------- /Fig/install/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/install/9.png -------------------------------------------------------------------------------- /Fig/otherinst/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/1.png -------------------------------------------------------------------------------- /Fig/otherinst/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/2.png -------------------------------------------------------------------------------- /Fig/otherinst/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/3.png -------------------------------------------------------------------------------- /Fig/otherinst/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/4.png -------------------------------------------------------------------------------- /Fig/otherinst/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/5.png -------------------------------------------------------------------------------- /Fig/otherinst/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/6.png -------------------------------------------------------------------------------- /Fig/otherinst/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/7.png -------------------------------------------------------------------------------- /Fig/otherinst/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/8.png -------------------------------------------------------------------------------- /Fig/otherinst/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/9.png -------------------------------------------------------------------------------- /code_fragment/llvmstructure/15.txt: -------------------------------------------------------------------------------- 1 | // ch3.cpp 2 | int main() 3 | { 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /Fig/otherinst/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/otherinst/10.png -------------------------------------------------------------------------------- /Table/funccall/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Table/funccall/1.png -------------------------------------------------------------------------------- /terminal_io/backendstructure/1.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost cmake_debug_build]$ rm -rf lib/Target/Cpu0/* 2 | -------------------------------------------------------------------------------- /terminal_io/llvmstructure/5.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost InputFiles]$ clang -c ch3.cpp -emit-llvm -o ch3.bc 2 | -------------------------------------------------------------------------------- /Fig/llvmstructure/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/llvmstructure/1.png -------------------------------------------------------------------------------- /Fig/llvmstructure/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/llvmstructure/2.png -------------------------------------------------------------------------------- /Fig/llvmstructure/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/llvmstructure/3.png -------------------------------------------------------------------------------- /Fig/llvmstructure/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/llvmstructure/4.png -------------------------------------------------------------------------------- /Fig/llvmstructure/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/llvmstructure/5.png -------------------------------------------------------------------------------- /Fig/llvmstructure/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/llvmstructure/6.png -------------------------------------------------------------------------------- /Fig/llvmstructure/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/llvmstructure/7.png -------------------------------------------------------------------------------- /Fig/llvmstructure/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/llvmstructure/8.png -------------------------------------------------------------------------------- /Fig/Author_ChineseName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/Author_ChineseName.png -------------------------------------------------------------------------------- /Fig/backendstructure/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/backendstructure/1.png -------------------------------------------------------------------------------- /Fig/backendstructure/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/backendstructure/2.png -------------------------------------------------------------------------------- /Fig/backendstructure/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/backendstructure/3.png -------------------------------------------------------------------------------- /Fig/backendstructure/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/backendstructure/4.png -------------------------------------------------------------------------------- /Fig/backendstructure/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/backendstructure/5.png -------------------------------------------------------------------------------- /Fig/backendstructure/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/backendstructure/6.png -------------------------------------------------------------------------------- /Fig/backendstructure/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/backendstructure/7.png -------------------------------------------------------------------------------- /Fig/backendstructure/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/backendstructure/8.png -------------------------------------------------------------------------------- /Fig/backendstructure/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Fig/backendstructure/9.png -------------------------------------------------------------------------------- /Table/llvmstructure/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Table/llvmstructure/1.png -------------------------------------------------------------------------------- /Table/llvmstructure/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Table/llvmstructure/2.png -------------------------------------------------------------------------------- /Table/llvmstructure/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/Table/llvmstructure/3.png -------------------------------------------------------------------------------- /code_fragment/backendstructure/16.txt: -------------------------------------------------------------------------------- 1 | d = a * c 2 | e = d + b 3 | ... 4 | 5 | %d = fmul %a, %c 6 | %e = fadd %d, %b 7 | ... 8 | -------------------------------------------------------------------------------- /terminal_io/llvmstructure/2.txt: -------------------------------------------------------------------------------- 1 | cp -rf LLVMBackendTutorial/src_files_modified/src/* yourllvm/workingcopy/sourc 2 | edir/. 3 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/18.txt: -------------------------------------------------------------------------------- 1 | a = b + c // in notation IR form 2 | d = a – d 3 | %e = fmadd %a, %c, %b // in llvm SSA IR form 4 | -------------------------------------------------------------------------------- /code_fragment/llvmstructure/5.txt: -------------------------------------------------------------------------------- 1 | class Date { // declare Date 2 | int year, month, day; 3 | }; 4 | Date date; // define(instance) date 5 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch3.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch3.bc -------------------------------------------------------------------------------- /code_fragment/llvmstructure/13.txt: -------------------------------------------------------------------------------- 1 | extern "C" void LLVMInitializeCpu0Target() { 2 | } 3 | 4 | extern "C" void LLVMInitializeCpu0TargetMC() { 5 | } 6 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch4_2.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch4_2.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_1.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch5_1.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_2.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch5_2.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_3.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch5_3.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_6.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch5_6.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch7_1.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch7_1.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch4_2.cpu0.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch4_2.cpu0.o -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_1.cpu0.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch5_1.cpu0.o -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_5_1.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch5_5_1.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_5_2.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch5_5_2.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_5_3.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch5_5_3.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch6_1_1.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch6_1_1.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch6_1_2.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch6_1_2.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch6_1_3.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch6_1_3.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch7_1.cpu0.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch7_1.cpu0.o -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch7_1.mips.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch7_1.mips.o -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch7_1_4.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch7_1_4.bc -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_5_1.cpu0.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch5_5_1.cpu0.o -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch6_1_1.cpu0.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch6_1_1.cpu0.o -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch6_1_2.cpu0.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch6_1_2.cpu0.o -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch6_1_3.cpu0.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch6_1_3.cpu0.o -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch_test_8_1.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch_test_8_1.bc -------------------------------------------------------------------------------- /code_fragment/backendstructure/20.txt: -------------------------------------------------------------------------------- 1 | // ch3.ll 2 | define i32 @main() nounwind uwtable { 3 | %1 = alloca i32, align 4 4 | store i32 0, i32* %1 5 | ret i32 0 6 | } 7 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch_test_8_1.mips.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmermagazine/lbd/master/LLVMBackendTutorialExampleCode/InputFiles/ch_test_8_1.mips.o -------------------------------------------------------------------------------- /code_fragment/llvmstructure/2.txt: -------------------------------------------------------------------------------- 1 | def GR32 : RegisterClass<[i32], 32, 2 | [EAX, ECX, EDX, ESI, EDI, EBX, EBP, ESP, 3 | R8D, R9D, R10D, R11D, R14D, R15D, R12D, R13D]> { … } 4 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/14.txt: -------------------------------------------------------------------------------- 1 | def ADDiu : ArithLogicI<0x09, "addiu", add, simm16, immSExt16, CPURegs>; 2 | 3 | Pattern = [(set CPURegs:$ra, (add RC:$rb, immSExt16:$imm16))] 4 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/2/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0MCTargetDesc.cpp 4 | ) 5 | 6 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 7 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/19.txt: -------------------------------------------------------------------------------- 1 | load rb, M(sp+8); // assume b allocate in sp+8, sp is stack point register 2 | load rc, M(sp+16); 3 | add ra, rb, rc; 4 | load rd, M(sp+24); 5 | sub rd, ra, rd; 6 | fmadd re, ra, rc, rb; 7 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/1/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0MCTargetDesc.cpp 4 | ) 5 | 6 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 7 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/2/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0MCTargetDesc.cpp 4 | ) 5 | 6 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 7 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/3/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0MCAsmInfo.cpp 4 | Cpu0MCTargetDesc.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0MCAsmInfo.cpp 4 | Cpu0MCTargetDesc.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/5/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0MCAsmInfo.cpp 4 | Cpu0MCTargetDesc.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/1/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0MCAsmInfo.cpp 4 | Cpu0MCTargetDesc.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/5_gVarNotWorkYet/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0MCAsmInfo.cpp 4 | Cpu0MCTargetDesc.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/8.txt: -------------------------------------------------------------------------------- 1 | // Cpu0AsmPrinter.cpp 2 | // Force static initialization. 3 | extern "C" void LLVMInitializeCpu0AsmPrinter() { 4 | RegisterAsmPrinter X(TheCpu0Target); 5 | RegisterAsmPrinter Y(TheCpu0elTarget); 6 | } 7 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/2/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/1/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/2/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/3/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/5/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/1/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/2/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/1/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/2/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/3/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5_2/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_1/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_2/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/6/1/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/2/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/3/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4_3/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/5/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/8/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/3.txt: -------------------------------------------------------------------------------- 1 | # CMakeLists.txt 2 | ... 3 | add_llvm_target(Cpu0CodeGen 4 | Cpu0ISelLowering.cpp 5 | Cpu0InstrInfo.cpp 6 | Cpu0FrameLowering.cpp 7 | Cpu0Subtarget.cpp 8 | Cpu0TargetMachine.cpp 9 | Cpu0SelectionDAGInfo.cpp 10 | ) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.1/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.2/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/8/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/9/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/1_frame/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/6_Frame/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/3/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/5/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/1/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/2/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/1/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/2/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/3/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5_2/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_1/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_2/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/6/1/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/2/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/3/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4_3/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/5/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/8/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/5_gVarNotWorkYet/Cpu0/TargetInfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Info 4 | Cpu0TargetInfo.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0Info Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.1/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.2/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/8/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/9/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/1_frame/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/6_Frame/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/11.txt: -------------------------------------------------------------------------------- 1 | // In this stage, transfer the llvm opcode into machine opcode, but the operand 2 | // still is llvm virtual operand. 3 | store i16 0, i16* %a // store 0 of i16 type to where virtual register %a 4 | // point to 5 | => addiu i16 0, i32* %a 6 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/5_gVarNotWorkYet/Cpu0/InstPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0AsmPrinter 4 | Cpu0InstPrinter.cpp 5 | ) 6 | 7 | add_dependencies(LLVMCpu0AsmPrinter Cpu0CommonTableGen) 8 | -------------------------------------------------------------------------------- /terminal_io/backendstructure/3.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost InputFiles]$ /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/ 2 | bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 3 | /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc: target does not suppo 4 | rt generation of this file type! 5 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/15.txt: -------------------------------------------------------------------------------- 1 | def FMADDS : AForm_1<59, 29, 2 | (ops F4RC:$FRT, F4RC:$FRA, F4RC:$FRC, F4RC:$FRB), 3 | "fmadds $FRT, $FRA, $FRC, $FRB", 4 | [(set F4RC:$FRT, (fadd (fmul F4RC:$FRA, F4RC:$FRC), 5 | F4RC:$FRB))]>; 6 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/2/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/1/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/2/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/3/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/6/1/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/2/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/3/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/5/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/8/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5_2/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_1/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_2/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/8/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/9/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/1_frame/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4_3/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.1/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.2/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/6_Frame/Cpu0/MCTargetDesc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MCTargetDesc/CMakeLists.txt 2 | add_llvm_library(LLVMCpu0Desc 3 | Cpu0AsmBackend.cpp 4 | Cpu0MCAsmInfo.cpp 5 | Cpu0MCCodeEmitter.cpp 6 | Cpu0MCTargetDesc.cpp 7 | Cpu0ELFObjectWriter.cpp 8 | ) 9 | 10 | add_dependencies(LLVMCpu0Desc Cpu0CommonTableGen) 11 | -------------------------------------------------------------------------------- /code_fragment/llvmstructure/12.txt: -------------------------------------------------------------------------------- 1 | Target llvm::TheCpu0Target, llvm::TheCpu0elTarget; 2 | extern "C" void LLVMInitializeCpu0TargetInfo() { 3 | RegisterTarget X(TheCpu0Target, "cpu0", "Cpu0"); 5 | 6 | RegisterTarget Y(TheCpu0elTarget, "cpu0el", "Cpu0el"); 8 | } 9 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_5_2.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch5_5_2.cpp -emit-llvm -o ch5_5_2.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm ch5_5_2.bc -o ch5_5_2.cpu0.s 3 | 4 | int main() 5 | { 6 | int b = 3; 7 | 8 | int* p = &b; 9 | 10 | return *p; 11 | } 12 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_3.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch5_3.cpp -emit-llvm -o ch5_3.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm ch5_3.bc -o ch5_3.cpu0.s 3 | 4 | int main() 5 | { 6 | int a = 5; 7 | int b = 0; 8 | 9 | b = !a; 10 | 11 | return b; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/9.txt: -------------------------------------------------------------------------------- 1 | // LLVMBuild.txt 2 | [common] 3 | subdirectories = InstPrinter MCTargetDesc TargetInfo 4 | 5 | [component_0] 6 | ... 7 | # Please enable asmprinter 8 | has_asmprinter = 1 9 | ... 10 | 11 | [component_1] 12 | # Add AsmPrinter Cpu0AsmPrinter 13 | required_libraries = AsmPrinter CodeGen Core MC Cpu0AsmPrinter Cpu0Desc Cpu0Info 14 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch6_1_4.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch6_1_4.cpp -emit-llvm -o ch6_1_4.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -view-isel-dags -view-sched-dags -relocation-model=pic -filetype=asm ch6_1_4.bc -o ch6_1_4.cpu0.s 3 | 4 | int main() 5 | { 6 | int a[3]={0, 1, 2}; 7 | 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/2.txt: -------------------------------------------------------------------------------- 1 | //- Cpu0GenInstInfo.inc which generate from Cpu0InstrInfo.td 2 | #ifdef GET_INSTRINFO_HEADER 3 | #undef GET_INSTRINFO_HEADER 4 | namespace llvm { 5 | struct Cpu0GenInstrInfo : public TargetInstrInfoImpl { 6 | explicit Cpu0GenInstrInfo(int SO = -1, int DO = -1); 7 | }; 8 | } // End llvm namespace 9 | #endif // GET_INSTRINFO_HEADER 10 | -------------------------------------------------------------------------------- /code_fragment/llvmstructure/14.txt: -------------------------------------------------------------------------------- 1 | // Cpu0TargetInfo.cpp 2 | Target llvm::TheCpu0Target, llvm::TheCpu0elTarget; 3 | 4 | extern "C" void LLVMInitializeCpu0TargetInfo() { 5 | RegisterTarget X(TheCpu0Target, "cpu0", "Cpu0"); 7 | 8 | RegisterTarget Y(TheCpu0elTarget, "cpu0el", "Cpu0el"); 10 | } 11 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_6.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch5_6.cpp -emit-llvm -o ch5_6.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -view-isel-dags -view-sched-dags -relocation-model=pic -filetype=asm ch5_6.bc -o ch5_6.cpu0.s 3 | 4 | int main() 5 | { 6 | int b = 11; 7 | // unsigned int b = 11; 8 | 9 | b = (b+1)%12; 10 | 11 | return b; 12 | } 13 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch7_1_3.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch6_2_3.cpp -emit-llvm -o ch6_2_3.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm ch6_2_3.bc -o ch6_2_3.cpu0.s 3 | 4 | extern int sum_i(int x, int y); 5 | 6 | int main() 7 | { 8 | int b = 1; 9 | int c = 2; 10 | int a = sum_i(b, c); 11 | 12 | return a; 13 | } 14 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_5_1.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch5_5_1.cpp -emit-llvm -o ch5_5_1.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm ch5_5_1.bc -o ch5_5_1.cpu0.s 3 | 4 | int main() 5 | { 6 | int a = 1; 7 | int b = 2; 8 | int k = 0; 9 | unsigned int a1 = -5, f1 = 0; 10 | 11 | f1 = a1 / b; 12 | k = (a >> 2); 13 | 14 | return k; 15 | } 16 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/23.txt: -------------------------------------------------------------------------------- 1 | // Cpu0InstInfo.cpp 2 | ... 3 | MachineInstr* 4 | Cpu0InstrInfo::emitFrameIndexDebugValue(MachineFunction &MF, int FrameIx, 5 | uint64_t Offset, const MDNode *MDPtr, 6 | DebugLoc DL) const { 7 | MachineInstrBuilder MIB = BuildMI(MF, DL, get(Cpu0::DBG_VALUE)) 8 | .addFrameIndex(FrameIx).addImm(0).addImm(Offset).addMetadata(MDPtr); 9 | return &*MIB; 10 | } 11 | -------------------------------------------------------------------------------- /terminal_io/llvmstructure/3.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost cmake_debug_build]$ cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_ 2 | C_COMPILER=clang -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" ../src/ 3 | 4 | -- Targeting Cpu0 5 | ... 6 | -- Targeting XCore 7 | -- Configuring done 8 | -- Generating done 9 | -- Build files have been written to: /usr/local/llvm/3.1.test/cpu0/1/cmake_debug 10 | _build 11 | 12 | [Gamma@localhost cmake_debug_build]$ make 13 | ... 14 | [100%] Built target gtest_main 15 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch4_1.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch4_1.cpp -emit-llvm -o ch4_1.bc 2 | // /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch4_1.bc -o ch4_1.cpu0.s 3 | // /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc -march=cpu0 -relocation-model=pic -filetype=obj ch4_1.bc -o ch4_1.cpu0.o 4 | 5 | int main() 6 | { 7 | int a = 5; 8 | int b = 2; 9 | int c = 0; 10 | 11 | c = a + b; 12 | 13 | return c; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /terminal_io/llvmstructure/6.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost InputFiles]$ llvm-dis ch3.bc -o ch3.ll 2 | 3 | // ch3.ll 4 | ; ModuleID = 'ch3.bc' 5 | target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 6 | 2:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:6 7 | 4-S128" 8 | target triple = "x86_64-unknown-linux-gnu" 9 | 10 | define i32 @main() nounwind uwtable { 11 | %1 = alloca i32, align 4 12 | store i32 0, i32* %1 13 | ret i32 0 14 | } 15 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch7_1_2.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch6_2_1.cpp -emit-llvm -o ch6_2_1.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -view-isel-dags -view-sched-dags -relocation-model=pic -filetype=asm ch6_2_1.bc -o ch6_2_1.cpu0.s 3 | 4 | int sum_i(int x, int y, int* c) 5 | { 6 | int* p = c; 7 | int sum = x + y; 8 | 9 | return sum; 10 | } 11 | 12 | int main() 13 | { 14 | int cc = 5; 15 | int a = sum_i(1, 2, &cc); 16 | 17 | return a; 18 | } 19 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/10.txt: -------------------------------------------------------------------------------- 1 | store i32 0, i32* %a ; store i32 type of 0 to virtual register %a, %a is 2 | ; pointer type which point to i32 value 3 | store i32 %b, i32* %c ; store %b contents to %c point to, %b isi32 type virtual 4 | ; register, %c is pointer type which point to i32 value. 5 | %a1 = load i32* %a ; load the memory value where %a point to and assign the 6 | ; memory value to %a1 7 | %a3 = add i32 %a2, 1 ; add %a2 and 1 and save to %a3 8 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch3.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch3.cpp -emit-llvm -o ch3.bc 2 | // /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 3 | // /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc -march=cpu0 -relocation-model=pic -filetype=obj ch3.bc -o ch3.cpu0.o 4 | 5 | /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 6 | int main() 7 | { 8 | return 0; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /terminal_io/llvmstructure/4.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost cmake_debug_build]$ /usr/local/llvm/3.1.test/cpu0/1/cmake_debug 2 | _build/bin/llc --version 3 | LLVM (http://llvm.org/): 4 | LLVM version 3.1svn 5 | DEBUG build with assertions. 6 | Built Sep 21 2012 (18:27:58). 7 | Default target: x86_64-unknown-linux-gnu 8 | Host CPU: penryn 9 | 10 | Registered Targets: 11 | arm - ARM 12 | cellspu - STI CBEA Cell SPU [experimental] 13 | cpp - C++ backend 14 | cpu0 - Cpu0 15 | cpu0el - Cpu0el 16 | ... 17 | -------------------------------------------------------------------------------- /terminal_io/llvmstructure/7.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost InputFiles]$ /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/ 2 | bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 3 | llc: /usr/local/llvm/3.1.test/cpu0/1/src/tools/llc/llc.cpp:456: int main(int, ch 4 | ar **): Assertion `target.get() && "Could not allocate target machine!"' failed. 5 | Stack dump: 6 | 0. Program arguments: /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc 7 | -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 8 | Aborted (core dumped) 9 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/Disassembler/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 2 | 3 | add_llvm_library(LLVMCpu0Disassembler 4 | Cpu0Disassembler.cpp 5 | ) 6 | 7 | # workaround for hanging compilation on MSVC9 and 10 8 | if( MSVC_VERSION EQUAL 1400 OR MSVC_VERSION EQUAL 1500 OR MSVC_VERSION EQUAL 1600 ) 9 | set_property( 10 | SOURCE Cpu0Disassembler.cpp 11 | PROPERTY COMPILE_FLAGS "/Od" 12 | ) 13 | endif() 14 | 15 | add_dependencies(LLVMCpu0Disassembler Cpu0CommonTableGen) 16 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/22.txt: -------------------------------------------------------------------------------- 1 | // Cpu0TargetMachine.cpp 2 | ... 3 | // Install an instruction selector pass using 4 | // the ISelDag to gen Cpu0 code. 5 | bool Cpu0PassConfig::addInstSelector() { 6 | PM->add(createCpu0ISelDag(getCpu0TargetMachine())); 7 | return false; 8 | } 9 | 10 | // Cpu0ISelDAGToDAG.cpp 11 | /// createCpu0ISelDag - This pass converts a legalized DAG into a 12 | /// CPU0-specific DAG, ready for instruction scheduling. 13 | FunctionPass *llvm::createCpu0ISelDag(Cpu0TargetMachine &TM) { 14 | return new Cpu0DAGToDAGISel(TM); 15 | } 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_6_2.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch5_6_2.cpp -emit-llvm -o ch5_6_2.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -debug -view-isel-dags -relocation-model=pic -filetype=asm ch5_6_2.bc -o ch5_6_2.cpu0.s 3 | 4 | struct Date 5 | { 6 | int year; 7 | int month; 8 | int day; 9 | }; 10 | 11 | Date date = {2012, 10, 12}; 12 | 13 | int a[3] = {2011, 11, 13}; 14 | 15 | int main() 16 | { 17 | int* p = &date.month; 18 | *p = (*p)%12+1; 19 | p = &a[2]; 20 | *p = (*p)%30+1; 21 | 22 | return *p; 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch3.cpu0.s: -------------------------------------------------------------------------------- 1 | .section .mdebug.abi32 2 | .previous 3 | .file "ch3.bc" 4 | .text 5 | .globl main 6 | .align 2 7 | .type main,@function 8 | .ent main # @main 9 | main: 10 | .frame $sp,8,$lr 11 | .mask 0x00000000,0 12 | .set noreorder 13 | .set nomacro 14 | # BB#0: # %entry 15 | addiu $sp, $sp, -8 16 | addiu $2, $zero, 0 17 | st $2, 4($sp) 18 | addiu $sp, $sp, 8 19 | ret $lr 20 | .set macro 21 | .set reorder 22 | .end main 23 | $tmp1: 24 | .size main, ($tmp1)-main 25 | 26 | 27 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch6_1_2.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch6_1_2.cpp -emit-llvm -o ch6_1_2.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -view-isel-dags -view-sched-dags -relocation-model=pic -filetype=asm ch6_1_2.bc -o ch6_1_2.cpu0.s 3 | 4 | int main() 5 | { 6 | int a = 5; 7 | int b = 0; 8 | int* p = &a; 9 | 10 | b = !(*p); 11 | if (b == 0) { 12 | a = a + b; 13 | } else if (b < 0) { 14 | a = a--; 15 | } else if (b > 0) { 16 | a = a++; 17 | } else if (b != 0) { 18 | a = a - b; 19 | } 20 | return a; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch_test_8_1.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch_test_8_1.cpp -emit-llvm -o ch_test_8_1.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm -view-isel-dags ch_test_8_1.bc -o ch_test_8_1.cpu0.s 3 | 4 | struct date { 5 | char year; 6 | char month; 7 | char day; 8 | }; 9 | 10 | int main() 11 | { 12 | date d; 13 | d.year = char(12); 14 | d.month = char(12); 15 | d.day = char(2); 16 | char month = d.month; 17 | 18 | // int month = d.month; 19 | // d.day = char(1); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch7_1.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch7_1.cpp -emit-llvm -o ch7_1.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm ch7_1.bc -o ch7_1.cpu0.s 3 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=mips -relocation-model=pic -filetype=asm ch7_1.bc -o ch7_1.mips.s 4 | 5 | int sum_i(int x1, int x2, int x3, int x4, int x5, int x6) 6 | { 7 | int sum = x1 + x2 + x3 + x4 + x5 + x6; 8 | 9 | return sum; 10 | } 11 | 12 | int main() 13 | { 14 | int a = sum_i(1, 2, 3, 4, 5, 6); 15 | 16 | return a; 17 | } 18 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/2/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /terminal_io/backendstructure/6.txt: -------------------------------------------------------------------------------- 1 | define i32 @main() nounwind uwtable { 2 | %1 = alloca i32, align 4 3 | %2 = alloca i32, align 4 4 | ... 5 | store i32 0, i32* %1 6 | store i32 5, i32* %2, align 4 7 | ... 8 | ret i32 0 9 | 10 | => # BB#0: 11 | addiu $sp, $sp, -56 12 | $tmp1: 13 | addiu $3, $zero, 0 14 | st $3, 52($sp) // %1 is the first frame index local variable, so allocate 15 | // in 52($sp) 16 | addiu $2, $zero, 5 17 | st $2, 48($sp) // %2 is the second frame index local variable, so 18 | // allocate in 48($sp) 19 | ... 20 | ret $lr 21 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/1/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/2/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/3/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/5/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/1/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/2/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/1/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/2/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/3/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5_2/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_1/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_2/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/6/1/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/2/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/3/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4_3/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/5/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/8/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/2/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.1/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.2/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/8/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/9/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/1_frame/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /code_fragment/llvmstructure/8.txt: -------------------------------------------------------------------------------- 1 | def ADDiu : ArithLogicI<0x09, "addiu", add, simm16, immSExt16, CPURegs>; 2 | 3 | /// Arithmetic and logical instructions with 2 register operands. 4 | class ArithLogicI op, string instr_asm, SDNode OpNode, 5 | Operand Od, PatLeaf imm_type, RegisterClass RC> : 6 | FL { 9 | let isReMaterializable = 1; 10 | } 11 | 12 | So, 13 | op = 0x09 14 | instr_asm = “addiu” 15 | OpNode = add 16 | Od = simm16 17 | imm_type = immSExt16 18 | RC = CPURegs 19 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/1/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/2/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/3/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/5/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/1/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/2/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/1/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/2/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/3/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5_2/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_1/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_2/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/6_Frame/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/6/1/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/2/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/3/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4_3/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/5/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/8/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.1/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.2/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/8/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/9/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/1_frame/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/6.txt: -------------------------------------------------------------------------------- 1 | // Cpu0InstPrinter.cpp 2 | #include "Cpu0GenAsmWriter.inc" 3 | 4 | void Cpu0InstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const { 5 | //- getRegisterName(RegNo) defined in Cpu0GenAsmWriter.inc which came from 6 | //- Cpu0.td indicate. 7 | OS << '$' << StringRef(getRegisterName(RegNo)).lower(); 8 | } 9 | 10 | void Cpu0InstPrinter::printInst(const MCInst *MI, raw_ostream &O, 11 | StringRef Annot) { 12 | //- printInstruction(MI, O) defined in Cpu0GenAsmWriter.inc which came from 13 | //- Cpu0.td indicate. 14 | printInstruction(MI, O); 15 | printAnnotation(O, Annot); 16 | } 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/3/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/5/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/1/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/2/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/1/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/2/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/3/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5_2/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_1/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_2/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/5_gVarNotWorkYet/Cpu0/TargetInfo/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetInfo/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | LEVEL = ../../../.. 10 | LIBRARYNAME = LLVMCpu0Info 11 | 12 | # Hack: we need to include 'main' target directory to grab private headers 13 | CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 14 | 15 | include $(LEVEL)/Makefile.common 16 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/6_Frame/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/6/1/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/2/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/3/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4_3/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/5/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/8/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_5_2.cpu0.s: -------------------------------------------------------------------------------- 1 | .section .mdebug.abi32 2 | .previous 3 | .file "ch5_5_2.bc" 4 | .text 5 | .globl main 6 | .align 2 7 | .type main,@function 8 | .ent main # @main 9 | main: 10 | .frame $sp,16,$lr 11 | .mask 0x00000000,0 12 | .set noreorder 13 | .set nomacro 14 | # BB#0: # %entry 15 | addiu $sp, $sp, -16 16 | addiu $2, $zero, 0 17 | st $2, 12($sp) 18 | addiu $2, $zero, 3 19 | st $2, 8($sp) 20 | addiu $2, $sp, 8 21 | st $2, 4($sp) 22 | addiu $sp, $sp, 16 23 | ret $lr 24 | .set macro 25 | .set reorder 26 | .end main 27 | $tmp1: 28 | .size main, ($tmp1)-main 29 | 30 | 31 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.1/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/7.2/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/8/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/9/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/1_frame/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/Disassembler/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/Disassembler/Makefile ----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Disassembler 12 | 13 | # Hack: we need to include 'main' Cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/5_gVarNotWorkYet/Cpu0/MCTargetDesc/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/TargetDesc/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0Desc 12 | 13 | # Hack: we need to include 'main' target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/6_Frame/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /terminal_io/backendstructure/5.txt: -------------------------------------------------------------------------------- 1 | define i32 @main() nounwind uwtable { 2 | %1 = alloca i32, align 4 3 | store i32 0, i32* %1 4 | ret i32 0 5 | } 6 | 7 | .section .mdebug.abi32 8 | .previous 9 | .file "ch3.bc" 10 | .text 11 | .globl main 12 | .align 2 13 | .type main,@function 14 | .ent main # @main 15 | main: 16 | .frame $sp,8,$lr 17 | .mask 0x00000000,0 18 | .set noreorder 19 | .set nomacro 20 | # BB#0: # %entry 21 | addiu $sp, $sp, -8 22 | addiu $2, $zero, 0 23 | st $2, 4($sp) 24 | addiu $sp, $sp, 8 25 | ret $lr 26 | .set macro 27 | .set reorder 28 | .end main 29 | $tmp1: 30 | .size main, ($tmp1)-main 31 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch7_2.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch7_2.cpp -emit-llvm -o ch7_2.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm ch7_2.bc -o ch7_2.cpu0.s 3 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=mips -relocation-model=pic -filetype=asm ch7_2.bc -o ch7_2.mips.s 4 | 5 | using namespace std; 6 | 7 | int gI = 100; 8 | 9 | int sum_i(int x1, int x2, int x3, int x4, int x5, int x6) 10 | { 11 | int sum = gI + x1 + x2 + x3 + x4 + x5 + x6; 12 | 13 | return sum; 14 | } 15 | 16 | int main() 17 | { 18 | int a = sum_i(1, 2, 3, 4, 5, 6); 19 | 20 | return a; 21 | } 22 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch_test_8_2.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch_test_8_2.cpp -emit-llvm -o ch_test_8_2.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm -view-isel-dags ch_test_8_2.bc -o ch_test_8_2.cpu0.s 3 | 4 | struct date { 5 | char year; 6 | char month; 7 | char day; 8 | }; 9 | 10 | /* 11 | struct date { 12 | int year; 13 | int month; 14 | int day; 15 | }; 16 | 17 | date d = {int(12), int(11), int(30)};*/ 18 | 19 | int main() 20 | { 21 | 22 | date d = {char(12), char(11), char(30)}; 23 | char month = d.month; 24 | // int month = d.month; 25 | // d.day = char(1); 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/other/5_gVarNotWorkYet/Cpu0/InstPrinter/Makefile: -------------------------------------------------------------------------------- 1 | ##===- lib/Target/Cpu0/AsmPrinter/Makefile -----------------*- Makefile -*-===## 2 | # 3 | # The LLVM Compiler Infrastructure 4 | # 5 | # This file is distributed under the University of Illinois Open Source 6 | # License. See LICENSE.TXT for details. 7 | # 8 | ##===----------------------------------------------------------------------===## 9 | 10 | LEVEL = ../../../.. 11 | LIBRARYNAME = LLVMCpu0AsmPrinter 12 | 13 | # Hack: we need to include 'main' cpu0 target directory to grab private headers 14 | CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. 15 | 16 | include $(LEVEL)/Makefile.common 17 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/errormessage.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost EmitLlvm]$ /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch0.bc -o ch0.cpu0.sTarget didn't implement TargetInstrInfo::storeRegToStackSlot! 2 | UNREACHABLE executed at /usr/local/llvm/3.1.test/cpu0/1/src/include/llvm/Target/TargetInstrInfo.h:390! 3 | Stack dump: 4 | 0. Program arguments: /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch0.bc -o ch0.cpu0.s 5 | 1. Running pass 'Function Pass Manager' on module 'ch0.bc'. 6 | 2. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function '@main' 7 | Aborted (core dumped) 8 | 9 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_5_3.cpp: -------------------------------------------------------------------------------- 1 | // clang -c -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/ ch5_5_3.cpp -emit-llvm -o ch5_5_3.bc 2 | // clang -c ch5_5_3.cpp -emit-llvm -o ch5_5_3.bc 3 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -debug -view-isel-dags -relocation-model=pic -filetype=asm ch5_5_3.bc -o ch5_5_3.cpu0.s 4 | 5 | struct Date 6 | { 7 | int year; 8 | int month; 9 | int day; 10 | }; 11 | 12 | Date date = {2012, 10, 12}; 13 | 14 | int a[3] = {2011, 11, 13}; 15 | 16 | int main() 17 | { 18 | int* p = &date.month; 19 | *p = *p+1; 20 | p = &a[2]; 21 | 22 | return *p; 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/2/Cpu0/Cpu0TargetMachine.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0TargetMachine.cpp - Define TargetMachine for Cpu0 -------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // Implements the info about Cpu0 target spec. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #include "llvm/Support/TargetRegistry.h" 15 | using namespace llvm; 16 | 17 | extern "C" void LLVMInitializeCpu0Target() { 18 | } 19 | 20 | -------------------------------------------------------------------------------- /code_fragment/backendstructure/21.txt: -------------------------------------------------------------------------------- 1 | /// Load and Store Instructions 2 | /// aligned 3 | defm LW : LoadM32<0x00, "lw", load_a>; 4 | defm ST : StoreM32<0x01, "st", store_a>; 5 | 6 | /// Arithmetic Instructions (ALU Immediate) 7 | //def LDI : MoveImm<0x08, "ldi", add, simm16, immSExt16, CPURegs>; 8 | // add defined in include/llvm/Target/TargetSelectionDAG.td, line 315 (def add). 9 | def ADDiu : ArithLogicI<0x09, "addiu", add, simm16, immSExt16, CPURegs>; 10 | 11 | let isReturn=1, isTerminator=1, hasDelaySlot=1, isCodeGenOnly=1, 12 | isBarrier=1, hasCtrlDep=1 in 13 | def RET : FJ <0x2C, (outs), (ins CPURegs:$target), 14 | "ret\t$target", [(Cpu0Ret CPURegs:$target)], IIBranch>; 15 | -------------------------------------------------------------------------------- /terminal_io/backendstructure/4.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost InputFiles]$ /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/ 2 | bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 3 | Target didn't implement TargetInstrInfo::storeRegToStackSlot! 4 | UNREACHABLE executed at /usr/local/llvm/3.1.test/cpu0/1/src/include/llvm/Target/ 5 | TargetInstrInfo.h:390! 6 | Stack dump: 7 | 0. Program arguments: /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc 8 | -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 9 | 1. Running pass 'Function Pass Manager' on module 'ch3.bc'. 10 | 2. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function 11 | '@main' 12 | Aborted (core dumped) 13 | -------------------------------------------------------------------------------- /terminal_io/backendstructure/7.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost InputFiles]$ /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/ 2 | bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 3 | [Gamma@localhost InputFiles]$ cat ch3.cpu0.s 4 | .section .mdebug.abi32 5 | .previous 6 | .file "ch3.bc" 7 | .text 8 | .globl main 9 | .align 2 10 | .type main,@function 11 | .ent main # @main 12 | main: 13 | .frame $sp,8,$lr 14 | .mask 0x00000000,0 15 | .set noreorder 16 | .set nomacro 17 | # BB#0: # %entry 18 | addiu $sp, $sp, -8 19 | addiu $2, $zero, 0 20 | st $2, 4($sp) 21 | addiu $sp, $sp, 8 22 | ret $lr 23 | .set macro 24 | .set reorder 25 | .end main 26 | $tmp1: 27 | .size main, ($tmp1)-main 28 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch4_2_printf.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch3_1.cpp -emit-llvm -o ch3_1.bc 2 | // /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch3_1.bc -o ch3_1.cpu0.s 3 | // /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc -march=cpu0 -relocation-model=pic -filetype=obj ch3_1.bc -o ch3_1.cpu0.o 4 | 5 | #include 6 | 7 | int main() 8 | { 9 | int a = 5; 10 | int b = 2; 11 | int c = 0; 12 | int d = 0; 13 | int e, f, g, h, i, j, k = 0; 14 | 15 | c = a + b; 16 | d = a - b; 17 | e = a * b; 18 | f = a / b; 19 | g = (a & b); 20 | h = (a | b); 21 | i = (a ^ b); 22 | j = (a << 2); 23 | k = (a >> 2); 24 | 25 | printf("j = %.8x, k = %.8x\n", j, k); 26 | 27 | return e; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /code_fragment/llvmstructure/1.txt: -------------------------------------------------------------------------------- 1 | define i32 @add1(i32 %a, i32 %b) { 2 | entry: 3 | %tmp1 = add i32 %a, %b 4 | ret i32 %tmp1 5 | } 6 | define i32 @add2(i32 %a, i32 %b) { 7 | entry: 8 | %tmp1 = icmp eq i32 %a, 0 9 | br i1 %tmp1, label %done, label %recurse 10 | recurse: 11 | %tmp2 = sub i32 %a, 1 12 | %tmp3 = add i32 %b, 1 13 | %tmp4 = call i32 @add2(i32 %tmp2, i32 %tmp3) 14 | ret i32 %tmp4 15 | done: 16 | ret i32 %b 17 | } 18 | This LLVM IR corresponds to this C code, which provides two different ways to 19 | add integers: 20 | unsigned add1(unsigned a, unsigned b) { 21 | return a+b; 22 | } 23 | // Perhaps not the most efficient way to add two numbers. 24 | unsigned add2(unsigned a, unsigned b) { 25 | if (a == 0) return b; 26 | return add2(a-1, b+1); 27 | } 28 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch5_3.cpu0.s: -------------------------------------------------------------------------------- 1 | .section .mdebug.abi32 2 | .previous 3 | .file "ch5_3.bc" 4 | .text 5 | .globl main 6 | .align 2 7 | .type main,@function 8 | .ent main # @main 9 | main: 10 | .frame $sp,16,$lr 11 | .mask 0x00000000,0 12 | .set noreorder 13 | .set nomacro 14 | # BB#0: # %entry 15 | addiu $sp, $sp, -16 16 | addiu $2, $zero, 0 17 | st $2, 12($sp) 18 | addiu $3, $zero, 5 19 | st $3, 8($sp) 20 | st $2, 4($sp) 21 | lw $3, 8($sp) 22 | xor $2, $3, $2 23 | ldi $3, 1 24 | xor $2, $2, $3 25 | addiu $3, $zero, 1 26 | and $2, $2, $3 27 | st $2, 4($sp) 28 | addiu $sp, $sp, 16 29 | ret $lr 30 | .set macro 31 | .set reorder 32 | .end main 33 | $tmp1: 34 | .size main, ($tmp1)-main 35 | 36 | 37 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch_test_8_1.mips.s: -------------------------------------------------------------------------------- 1 | .section .mdebug.abi32 2 | .previous 3 | .file "ch_test_8_1.bc" 4 | .text 5 | .globl main 6 | .align 2 7 | .type main,@function 8 | .ent main # @main 9 | main: 10 | .cfi_startproc 11 | .frame $sp,16,$ra 12 | .mask 0x00000000,0 13 | .fmask 0x00000000,0 14 | .set noreorder 15 | .set nomacro 16 | # BB#0: 17 | addiu $sp, $sp, -16 18 | $tmp1: 19 | .cfi_def_cfa_offset 16 20 | sw $zero, 12($sp) 21 | addiu $2, $zero, 12 22 | sb $2, 8($sp) 23 | sb $2, 9($sp) 24 | addiu $2, $zero, 2 25 | sb $2, 10($sp) 26 | lbu $2, 9($sp) 27 | sb $2, 4($sp) 28 | addu $2, $zero, $zero 29 | addiu $sp, $sp, 16 30 | jr $ra 31 | nop 32 | .set macro 33 | .set reorder 34 | .end main 35 | $tmp2: 36 | .size main, ($tmp2)-main 37 | .cfi_endproc 38 | 39 | 40 | -------------------------------------------------------------------------------- /terminal_io/llvmstructure/1.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost cmake_debug_build]$ grep -R -i "cpu0" ../src/ 2 | ../src/CMakeLists.txt: Cpu0 3 | ../src/lib/Target/LLVMBuild.txt:subdirectories = ARM CellSPU CppBackend Hexagon 4 | MBlaze MSP430 Mips Cpu0 PTX PowerPC Sparc X86 XCore ../src/lib/MC/MCExpr.cpp: 5 | case VK_Cpu0_GPREL: return "GPREL"; 6 | ... 7 | ../src/lib/MC/MCELFStreamer.cpp: case MCSymbolRefExpr::VK_Cpu0_TLSGD: 8 | ... 9 | ../src/lib/MC/MCDwarf.cpp: // AT_language, a 4 byte value. We use DW_LANG_Cpu0 10 | _Assembler as the dwarf2 11 | ../src/lib/MC/MCDwarf.cpp: // MCOS->EmitIntValue(dwarf::DW_LANG_Cpu0_Assembler, 12 | 2); 13 | ../src/lib/Support/Triple.cpp: case cpu0: return "cpu0"; 14 | ... 15 | ../src/include/llvm/Support/ELF.h: EM_LATTICEMICO32 = 138, // RISC processor fo 16 | r Lattice CPU0 architecture 17 | ... 18 | -------------------------------------------------------------------------------- /terminal_io/backendstructure/2.txt: -------------------------------------------------------------------------------- 1 | [Gamma@localhost InputFiles]$ /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/ 2 | bin/llc -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 3 | llc: /usr/local/llvm/3.1.test/cpu0/1/src/lib/CodeGen/LLVMTargetMachine.cpp:78: l 4 | lvm::LLVMTargetMachine::LLVMTargetMachine(const llvm::Target &, llvm::StringRef, 5 | llvm::StringRef, llvm::StringRef, llvm::TargetOptions, Reloc::Model, CodeModel: 6 | :Model, CodeGenOpt::Level): Assertion `AsmInfo && "MCAsmInfo not initialized." 7 | "Make sure you include the correct TargetSelect.h" "and that InitializeAllTarge 8 | tMCs() is being invoked!"' failed. 9 | Stack dump: 10 | 0. Program arguments: /usr/local/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/llc 11 | -march=cpu0 -relocation-model=pic -filetype=asm ch3.bc -o ch3.cpu0.s 12 | Aborted (core dumped) 13 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/1/Cpu0/Cpu0InstrInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0InstrInfo.cpp - Cpu0 Instruction Information ------------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file contains the Cpu0 implementation of the TargetInstrInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #include "Cpu0InstrInfo.h" 15 | #include "Cpu0TargetMachine.h" 16 | #define GET_INSTRINFO_CTOR 17 | #include "Cpu0GenInstrInfo.inc" 18 | 19 | using namespace llvm; 20 | 21 | Cpu0InstrInfo::Cpu0InstrInfo(Cpu0TargetMachine &tm) 22 | : 23 | TM(tm) 24 | {} 25 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/2/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/1/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/2/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/3/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/3/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/5/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/5/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/1/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/1/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/2/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/2/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/1/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/1/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/2/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/2/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/3/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/3/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/6/1/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/6/1/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/2/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/2/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/3/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/3/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/5/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/5/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/8/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/8/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/9/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/InputFiles/ch7_1_4.cpp: -------------------------------------------------------------------------------- 1 | // clang -c ch7_1_4.cpp -emit-llvm -o ch7_1_4.bc 2 | // /Users/Jonathan/llvm/3.1.test/cpu0/1/cmake_debug_build/bin/Debug/llc -march=cpu0 -relocation-model=pic -filetype=asm ch7_1_4.bc -o ch7_1_4.cpu0.s 3 | 4 | int multiply(int x, int y) 5 | { 6 | return (x*y); 7 | } 8 | 9 | int add(int x, int y) 10 | { 11 | return (x+y); 12 | } 13 | 14 | int madd(int x, int y, int z) 15 | { 16 | return add(z, multiply(x, y)); 17 | } 18 | 19 | /*int multiply(int x, int y) 20 | { 21 | int result = x*y; 22 | return result; 23 | } 24 | 25 | int add(int x, int y) 26 | { 27 | int sum = x+y; 28 | return sum; 29 | } 30 | 31 | int madd(int x, int y, int z) 32 | { 33 | int result = add(z, multiply(x, y)); 34 | 35 | return result; 36 | }*/ 37 | 38 | int main() 39 | { 40 | int cc = 5; 41 | int a = madd(1, 2, cc); 42 | 43 | return a; 44 | } 45 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5_2/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5_2/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_1/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_1/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_2/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_2/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4_3/Cpu0/InstPrinter/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0AsmPrinter 21 | parent = Cpu0 22 | required_libraries = MC Support 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/7/4_3/Cpu0/TargetInfo/LLVMBuild.txt: -------------------------------------------------------------------------------- 1 | ;===- ./lib/Target/Cpu0/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; 2 | ; 3 | ; The LLVM Compiler Infrastructure 4 | ; 5 | ; This file is distributed under the University of Illinois Open Source 6 | ; License. See LICENSE.TXT for details. 7 | ; 8 | ;===------------------------------------------------------------------------===; 9 | ; 10 | ; This is an LLVMBuild description file for the components in this subdirectory. 11 | ; 12 | ; For more information on the LLVMBuild system, please see: 13 | ; 14 | ; http://llvm.org/docs/LLVMBuild.html 15 | ; 16 | ;===------------------------------------------------------------------------===; 17 | 18 | [component_0] 19 | type = Library 20 | name = Cpu0Info 21 | parent = Cpu0 22 | required_libraries = MC Support Target 23 | add_to_library_groups = Cpu0 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/1/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/2/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/3/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/4/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/3/5/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/1/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/4/2/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/1/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/2/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/3/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/5_2/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | -------------------------------------------------------------------------------- /LLVMBackendTutorialExampleCode/5/6_1/Cpu0/Cpu0SelectionDAGInfo.cpp: -------------------------------------------------------------------------------- 1 | //===-- Cpu0SelectionDAGInfo.cpp - Cpu0 SelectionDAG Info -----------------===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file implements the Cpu0SelectionDAGInfo class. 11 | // 12 | //===----------------------------------------------------------------------===// 13 | 14 | #define DEBUG_TYPE "cpu0-selectiondag-info" 15 | #include "Cpu0TargetMachine.h" 16 | using namespace llvm; 17 | 18 | Cpu0SelectionDAGInfo::Cpu0SelectionDAGInfo(const Cpu0TargetMachine &TM) 19 | : TargetSelectionDAGInfo(TM) { 20 | } 21 | 22 | Cpu0SelectionDAGInfo::~Cpu0SelectionDAGInfo() { 23 | } 24 | --------------------------------------------------------------------------------