- 在 cbuild.toml 中启用 ir2mcode 和 sccf2target 依赖库 - 修改 justfile 中的构建命令,使用 release 模式并更新 tokei 统计排除 mcode 目录 - 重构 LIR 中的地址操作数类型,将 SCC_LIR_INSTR_KIND_ADDR 重命名为 SCC_LIR_INSTR_KIND_MEM - 实现完整的 MIR 到 x86_64 机器码转换,包括: - 添加 move、compare、binary operation 等指令发射函数 - 实现条件分支和跳转指令生成 - 支持算术、逻辑、移位等基本操作 - 添加调用和返回指令处理 - 实现栈分配和寄存器分配功能 - 完善 ir2mcode 模块,将 MIR 指令转换为机器码 - 更新 ir2sccf 模块,集成机器码生成功能 - 添加 mcode 库的架构支持和内存管理功能 - 修复 PE 文件生成中的空指针检查问题
40 lines
785 B
Makefile
40 lines
785 B
Makefile
list:
|
|
just --list
|
|
|
|
build_docs:
|
|
doxygen Doxyfile
|
|
|
|
docs: build_docs
|
|
python -m http.server -d docs/html
|
|
|
|
count:
|
|
# you need download `tokei` it can download by cargo
|
|
tokei libs runtime src -e tests -e libs/mcode
|
|
|
|
count-file:
|
|
# you need download `tokei` it can download by cargo
|
|
tokei libs runtime src -e tests -e libs/mcode --files
|
|
|
|
clean:
|
|
cbuild clean
|
|
|
|
build:
|
|
cbuild build -cclang --release
|
|
|
|
build-install: build
|
|
cp ./build/release/scc ./scc
|
|
|
|
test-scc:
|
|
# windows: (Get-Content a.txt -Raw) -replace '\x1b\[[0-9;]*[a-zA-Z]', '' | Set-Content clean.txt
|
|
# linux: sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' a.txt > clean.txt
|
|
just clean
|
|
just build-install
|
|
just clean
|
|
cbuild build -cscc
|
|
|
|
debug-scc:
|
|
just clean
|
|
just build-install
|
|
just clean
|
|
cbuild build -cscc --dev --record --dry-run
|