Fixed stack frame corruption

This commit is contained in:
Dmitry Stogov 2022-04-20 12:27:29 +03:00
parent 705f0f1e1d
commit 9796a7d9a4

View File

@ -1303,7 +1303,7 @@ static ir_reg ir_vreg_spill_slot(ir_ctx *ctx, ir_ref v)
return -offset; return -offset;
} else { } else {
ir_backend_data *data = ctx->data; ir_backend_data *data = ctx->data;
return data->stack_frame_size - sizeof(void*) - offset; return data->stack_frame_size - offset;
} }
} }
@ -1323,7 +1323,7 @@ static ir_reg ir_ref_spill_slot(ir_ctx *ctx, ir_ref ref)
return -offset; return -offset;
} else { } else {
ir_backend_data *data = ctx->data; ir_backend_data *data = ctx->data;
return data->stack_frame_size - sizeof(void*) - offset; return data->stack_frame_size - offset;
} }
} }