From bfbb857ab942d157ebe7009d6b3e86336eee056d Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Thu, 26 Sep 2024 17:39:50 -0700 Subject: [PATCH] Remove outdated stack size adjustment We don't save the function pointer to the stack anymore, so we shouldn't be adding a slot in the indirect call wrapper case. This wasn't breaking anything unless we had a return value on the stack. --- tools/rewriter/GenCallAsm.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/rewriter/GenCallAsm.cpp b/tools/rewriter/GenCallAsm.cpp index 70fe9dd46..716efcf76 100644 --- a/tools/rewriter/GenCallAsm.cpp +++ b/tools/rewriter/GenCallAsm.cpp @@ -646,10 +646,6 @@ std::string emit_asm_wrapper(const CAbiSignature &sig, size_t stack_return_align = 16; size_t stack_return_padding = 0; size_t start_of_ret_space = 0; - if (kind == WrapperKind::IndirectCallsite) { - // Count the space for the function pointer if the call is indirect. - start_of_ret_space += 8; - } if (stack_return_size > 0) { // If we have a stack return, we also have to save the old ret ptr, which