From 3784f161a383ead7d5fe9a5b68e4d07eccd82d49 Mon Sep 17 00:00:00 2001 From: Pat Bernardi Date: Sun, 1 Nov 2020 18:51:08 +0100 Subject: [PATCH] i386: Set the stack usage to 0 for naked functions gcc/ChangeLog * config/i386/i386.c (ix86_expand_prologue): Set the stack usage to 0 for naked functions. --- gcc/config/i386/i386.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f5f25eb95c9..8aa9516edea 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8142,7 +8142,11 @@ ix86_expand_prologue (void) rtx static_chain = NULL_RTX; if (ix86_function_naked (current_function_decl)) - return; + { + if (flag_stack_usage_info) + current_function_static_stack_size = 0; + return; + } ix86_finalize_stack_frame_flags (); -- 2.30.2