feat(ast2ir): 实现C11类型提升系统并重构HIR基本块管理
- 新增 scc_ast2ir_promote.c 实现整数提升(6.3.1.1)和寻常算术转换(6.3.1.8) - 重构 HIR Builder: bblock → create_bblock + append_bblock,引入BBList链表管理 - AST2IR 全面集成类型提升:二元运算、赋值、函数调用参数、自增/自减操作符 - 变参函数支持:跳过 ... 假参数,实现默认参数提升(float→double等) - 简化 HIR Dump 实现 - MIR: Win64 ABI改进、x86指令选择优化 - 新增 printf 测试用例
This commit is contained in:
@@ -120,11 +120,11 @@ static inline int scc_x86_patch_imm0_ex(scc_mcode_t *mcode, usize offset,
|
||||
|
||||
static inline void scc_x86_patch(scc_mcode_t *mcode,
|
||||
scc_x86_patch_type_t patch_type, u64 offset,
|
||||
i64 value) {
|
||||
u64 value) {
|
||||
switch (patch_type) {
|
||||
case SCC_X86_PATCH_PC32:
|
||||
scc_x86_patch_brdisp(mcode, offset - 4,
|
||||
scc_x86_op_relbr(value - offset));
|
||||
i32 rel = value - offset;
|
||||
scc_x86_patch_brdisp(mcode, offset - 4, scc_x86_op_relbr(rel));
|
||||
break;
|
||||
default:
|
||||
TODO();
|
||||
|
||||
Reference in New Issue
Block a user