Message ID | 1d7667cb-0944-74c6-634b-709be374fc99@yahoo.co.jp |
---|---|
State | New |
Headers | show |
Series | xtensa: Check DF availability before use | expand |
On Thu, Dec 29, 2022 at 4:33 AM Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> wrote: > > Parhaps no problem, but for safety. > > gcc/ChangeLog: > > * config/xtensa/xtensa.cc (xtensa_expand_prologue): Fix to check > DF availability before use of DF_* macros. > --- > gcc/config/xtensa/xtensa.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master.
diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc index 66e25349521..e726a115029 100644 --- a/gcc/config/xtensa/xtensa.cc +++ b/gcc/config/xtensa/xtensa.cc @@ -3322,7 +3322,7 @@ xtensa_expand_prologue (void) || crtl->calls_eh_return; /* Check if the function body really needs the stack pointer. */ - if (!stack_pointer_needed) + if (!stack_pointer_needed && df) for (ref = DF_REG_USE_CHAIN (A1_REG); ref; ref = DF_REF_NEXT_REG (ref)) if (DF_REF_CLASS (ref) == DF_REF_REGULAR