Message ID | 20190618212715.10938-1-jcmvbkbc@gmail.com |
---|---|
State | New |
Headers | show |
Series | xtensa: fix PR target/90922 | expand |
On Tue, Jun 18, 2019 at 2:27 PM Max Filippov <jcmvbkbc@gmail.com> wrote: > > 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 Approved, please apply.
On Tue, Jun 18, 2019 at 3:09 PM augustine.sterling@gmail.com <augustine.sterling@gmail.com> wrote: > > On Tue, Jun 18, 2019 at 2:27 PM Max Filippov <jcmvbkbc@gmail.com> wrote: > > > > 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 > > Approved, please apply. Thanks. Applied to trunk. I'll backport it later to gcc-7..9 branches.
On Tue, Jun 18, 2019 at 3:23 PM Max Filippov <jcmvbkbc@gmail.com> wrote: > > On Tue, Jun 18, 2019 at 3:09 PM augustine.sterling@gmail.com > <augustine.sterling@gmail.com> wrote: > > > > On Tue, Jun 18, 2019 at 2:27 PM Max Filippov <jcmvbkbc@gmail.com> wrote: > > > > > > 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 > > > > Approved, please apply. > > Thanks. Applied to trunk. > I'll backport it later to gcc-7..9 branches. I've committed the backported versions to gcc-7..9 branches.
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 19bd616d67f6..ee5612441e25 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 -