feat(ir2mcode): 添加IR到机器码转换模块并更新依赖配置

- 新增ir2mcode库用于将IR转换为机器码
- 添加sccf2target依赖以支持目标平台转换
- 在ast库中添加scc_pos依赖支持位置信息
- 更新cbuild.toml配置文件添加新库依赖
- 实现AMD64架构代码生成功能
- 添加寄存器分配器实现栈和寄存器位置管理
- 支持基本的算术运算和内存访问操作
- 添加PE格式目标文件生成支持
This commit is contained in:
zzy
2026-03-20 14:12:25 +08:00
parent 02a6c684f1
commit de6f5d510a
19 changed files with 4046 additions and 290 deletions

21
libs/ir2mcode/cbuild.toml Normal file
View File

@@ -0,0 +1,21 @@
[package]
name = "ir2mcode"
version = "0.1.0"
authors = []
description = ""
dependencies = [
{ name = "scc_utils", path = "../../runtime/scc_utils" },
{ name = "scc_ir", path = "../ir" },
{ name = "scc_mcode", path = "../mcode" },
{ name = "sccf", path = "../sccf" },
{ name = "lexer", path = "../lexer" },
{ name = "pproc", path = "../pproc" },
{ name = "parser", path = "../parser" },
{ name = "ast", path = "../ast" },
{ name = "ast2ir", path = "../ast2ir" },
{ name = "sccf2target", path = "../target/sccf2target" },
]
# features = {}
# default_features = []