From 9796a7d9a4914ee2f65bfed93a6313ab85f87e4b Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 20 Apr 2022 12:27:29 +0300 Subject: [PATCH] Fixed stack frame corruption --- ir_x86.dasc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ir_x86.dasc b/ir_x86.dasc index 201d3b4..5cccab9 100644 --- a/ir_x86.dasc +++ b/ir_x86.dasc @@ -1303,7 +1303,7 @@ static ir_reg ir_vreg_spill_slot(ir_ctx *ctx, ir_ref v) return -offset; } else { 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; } else { ir_backend_data *data = ctx->data; - return data->stack_frame_size - sizeof(void*) - offset; + return data->stack_frame_size - offset; } }