On Wed, Aug 17, 2022 at 2:52 AM Takayuki 'January June' Suwa
<jjsuwa_sys3...@yahoo.co.jp> wrote:
> As a matter of fact, "in a few cases" is just only one:
>
> [xtensa_expand_epilogue() in /gcc/config/xtensa/xtensa.cc]
> >      if (cfun->machine->current_frame_size > 0)
> >       {
> >         if (frame_pointer_needed || /* always reachable with addi */
> >             cfun->machine->current_frame_size > 1024 ||
> >             cfun->machine->current_frame_size <= 127)
> >           {
> >             if (cfun->machine->current_frame_size <= 127)
> >               offset = cfun->machine->current_frame_size;
> >             else
> >               offset = cfun->machine->callee_save_size;
> >
> >             emit_insn (gen_addsi3 (stack_pointer_rtx,
> >                                    stack_pointer_rtx,
> >                                    GEN_INT (offset)));        // offset can 
> > be zero!
> >           }

Oh, nice catch! I'll post a patch that adds a check for non-zero offset here.

-- 
Thanks.
-- Max

Reply via email to