irre-tools

所属分类:其他
开发工具:D
文件大小:0KB
下载次数:0
上传日期:2023-10-16 03:57:55
上 传 者sh-1993
说明:  玩具手写汇编程序、模拟器、编译器、轻量级RISC架构的工具链,
(toy handwritten assembler, emulator, compiler, toolchain for a lightweight RISC architecture,)

文件列表:
LICENSE (11357, 2023-10-15)
build.docker (509, 2023-10-15)
build.sh (143, 2023-10-15)
doc/ (0, 2023-10-15)
doc/arch.md (13842, 2023-10-15)
doc/asm.md (83, 2023-10-15)
doc/full_build.md (296, 2023-10-15)
doc/icon.png (490, 2023-10-15)
doc/ift.md (4406, 2023-10-15)
lib/ (0, 2023-10-15)
lib/infoflow/ (0, 2023-10-15)
script/ (0, 2023-10-15)
script/compile_c_leg.sh (257, 2023-10-15)
script/irre_cc_old.sh (630, 2023-10-15)
script/irrecc (1718, 2023-10-15)
script/make_tests.py (1362, 2023-10-15)
script/test_matrix.py (1499, 2023-10-15)
src/ (0, 2023-10-15)
src/irre/ (0, 2023-10-15)
src/irre/dub.sdl (257, 2023-10-15)
src/irre/source/ (0, 2023-10-15)
src/irre/source/irre/ (0, 2023-10-15)
src/irre/source/irre/analysis/ (0, 2023-10-15)
src/irre/source/irre/analysis/irre_arch.d (899, 2023-10-15)
src/irre/source/irre/analysis/minimizer.d (13215, 2023-10-15)
src/irre/source/irre/assembler/ (0, 2023-10-15)
src/irre/source/irre/assembler/ast.d (3212, 2023-10-15)
src/irre/source/irre/assembler/ast_builder.d (2142, 2023-10-15)
src/irre/source/irre/assembler/ast_freezer.d (2817, 2023-10-15)
src/irre/source/irre/assembler/builtins.d (6134, 2023-10-15)
src/irre/source/irre/assembler/lexer.d (7967, 2023-10-15)
src/irre/source/irre/assembler/linker.d (85, 2023-10-15)
src/irre/source/irre/assembler/parser.d (23103, 2023-10-15)
... ...

![icon](https://github.com/redthing1/irre-tools/blob/master/doc/icon.png) # irre-tools toy handwritten assembler, emulator, compiler, toolchain for a lightweight RISC architecture ## documentation documentation and specifications ([arch](https://github.com/redthing1/irre-tools/blob/master/doc/arch.md), [asm](https://github.com/redthing1/irre-tools/blob/master/doc.asm.md)) are available in [doc](https://github.com/redthing1/irre-tools/blob/master/doc/). ## setup grab submodules: ```sh git submodule update --init --recursive ``` install dependencies: + C compiler + [D compiler](https://github.com/redthing1/irre-tools/blob/master/https://dlang.org/download.html) ### quickstart build ```sh ./script/build_tools.sh ``` tools you now have: + `./src/irretool/irretool` (irre multitool) + `./tools/chcc/chibicc` (c->irre compiler) ## compile a C program ```c // my_prog.c int add(int a, int b) { return a + b; } int main() { int a = 3; int b = 4; int sum = add(a, b); return sum; } ``` now build and run: ```sh # compile to binary ./script/irrecc -v -o my_prog.bin my_prog.c # run in emulator ./src/irretool/irretool -v emu my_prog.bin ``` ## run flow tracking 1. run a compiled program and log commits and snapshots ```sh ./src/irretool/irretool -v emu --commit-log --save-commits t1_trace.bin my_prog.bin ``` 2. run analyzer ```sh ./src/irretool/irretool analyze --ift --pl --pl-threads 4 --ift-graph --ift-graph-analysis --ift-save-graph t1_graph.dot t1_trace.bin ```

近期下载者

相关文件


收藏者