stage2 修复大量AI生成的风格问题 stage1 修复对于vm abi的错误生成
This commit is contained in:
1 parent
0e38858785
commit
76f980654c
40 files changed
+619
-938
No files matched your search
+4
-2
@@ -1081,7 +1081,9 @@ static void cg_control(cgen_t *cg, usize ref, const spl_ir_node_t *n) {
|
||||
spl_type_id_t ret_t = n->control_call.tid;
|
||||
bool ret_is_sret = ir_is_aggregate(ctx, ret_t);
|
||||
usize sret_off = 0;
|
||||
usize j = 0;
|
||||
/* j = 本节点已压入 tracked 块之上的值的个数(用于栈化 PICK 距离)。
|
||||
先压 2 个 ABI 空闲 slot,故从 2 起算。 */
|
||||
usize j = 2;
|
||||
|
||||
/* ABI:实参下方预留 2 个空闲 slot(PAD0/PAD1)。 */
|
||||
CG_PUSH(cg, SPL_U64, 0);
|
||||
@@ -1090,7 +1092,7 @@ static void cg_control(cgen_t *cg, usize ref, const spl_ir_node_t *n) {
|
||||
if (ret_is_sret) {
|
||||
sret_off = vec_at(cg->frame.slots, ref).data_off;
|
||||
CG_LADDR(cg, sret_off);
|
||||
j = 1;
|
||||
j = 3;
|
||||
}
|
||||
for (usize i = 0; i < nargs; ++i) {
|
||||
spl_ir_node_ref_t pref = vec_at(n->control_call.params, i);
|
||||
|
||||
Reference in new issue
Block a user