From 1fe39f194c83e0189a239edf44d9db191c1625fa Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Tue, 18 Jun 2019 22:19:12 +0000 Subject: [PATCH] xtensa: fix PR target/90922 Stack pointer adjustment code in prologue missed a case of no callee-saved registers and a stack frame size bigger than 128 bytes. Handle that case. This fixes the following gcc tests with call0 ABI: gcc.c-torture/execute/stdarg-2.c gcc.dg/torture/pr55882.c gcc.dg/torture/pr57569.c 2019-06-18 Max Filippov gcc/ * config/xtensa/xtensa.c (xtensa_expand_prologue): Add stack pointer adjustment for the case of no callee-saved registers and stack frame bigger than 128 bytes. From-SVN: r272455 --- gcc/ChangeLog | 7 +++++++ gcc/config/xtensa/xtensa.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 43a0a23..d8b56f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-06-18 Max Filippov + + PR target/90922 + * config/xtensa/xtensa.c (xtensa_expand_prologue): Add stack + pointer adjustment for the case of no callee-saved registers and + stack frame bigger than 128 bytes. + 2019-06-18 Thomas Schwinge PR middle-end/90862 diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 19bd616..ee56124 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -2865,7 +2865,8 @@ xtensa_expand_prologue (void) gen_rtx_SET (mem, reg)); } } - if (total_size > 1024) + if (total_size > 1024 + || (!callee_save_size && total_size > 128)) { rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG); emit_move_insn (tmp_reg, GEN_INT (total_size - -- 2.7.4