feat(mir): 添加栈偏移操作数类型并重构内存访问表示
- 将 MIR 中的 SCC_MIR_OP_MEM 替换为更精确的 SCC_MIR_OP_STACK_SLOT 和 SCC_MIR_OP_STACK_OFFSET 类型 - 在 x86_64 指令选择中更新相应的内存操作数处理逻辑 - 修改寄存器分配器中的栈槽操作数类型检查 - 更新 IR 转机器码过程中的内存操作数转换 refactor(hir): 使用 tree_dump_node 输出函数节点 - 将 hir_dump 中的函数名输出从 append 改为 node 类型 refactor(frame-layout): 重构栈帧布局传递实现结构 - 引入函数指针实现方式替代直接函数实现 - 将栈帧分配功能集成到 MIR 传递流程中 - 移除独立的 frame_layout 实现文件 refactor(prolog-epilog): 添加函数序言/尾声传递框架 - 为 Windows x64 平台初始化序言/尾声生成器 - 在 MIR 传递阶段添加序言/尾声处理步骤 refactor(win64): 更新 Windows x64 目标平台接口 - 重命名寄存器分配填充函数为 scc_win_pc_x64_reg_alloc_fill - 添加栈帧分配和序言/尾声初始化函数 - 修正参数传递中的栈槽操作数类型 refactor(dump): 改进 MIR 输出格式 - 将基本块显示改为分支节点类型 - 更新操作数类型的显示处理 chore: 添加 x86 编码相关数据结构定义 - 新增 scc_x86_encode.h 头文件包含内存操作数和指令编码接口定义
This commit is contained in:
@@ -3,10 +3,15 @@
|
||||
|
||||
#include "../scc_mir_module.h"
|
||||
|
||||
typedef struct scc_frame_layout {
|
||||
scc_mir_func_t *func;
|
||||
} scc_frame_layout_t;
|
||||
struct scc_frame_layout;
|
||||
typedef struct scc_frame_layout scc_frame_layout_t;
|
||||
typedef void (*scc_frame_layout_impl_fn)(scc_frame_layout_t *ctx,
|
||||
scc_mir_module_t *mir_module,
|
||||
scc_mir_func_t *mir_func);
|
||||
|
||||
void scc_frame_layout(scc_frame_layout_t *ctx, scc_mir_module_t *module);
|
||||
struct scc_frame_layout {
|
||||
scc_frame_layout_impl_fn impl_fn;
|
||||
int offset;
|
||||
};
|
||||
|
||||
#endif /* __SCC_FRAME_LAYOUT_H__ */
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#ifndef __SCC_PROLOG_EPILOG_H__
|
||||
#define __SCC_PROLOG_EPILOG_H__
|
||||
|
||||
#include "../scc_mir_module.h"
|
||||
#include <scc_lir_module.h>
|
||||
#include <scc_mir_module.h>
|
||||
|
||||
typedef void (*scc_prolog_epilog_fn)(void *userdata,
|
||||
const scc_mir_func_t *func);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user