public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] xtensa: Check DF availability before use
       [not found] <1d7667cb-0944-74c6-634b-709be374fc99.ref@yahoo.co.jp>
@ 2022-12-29 12:14 ` Takayuki 'January June' Suwa
  2022-12-29 17:13   ` Max Filippov
  0 siblings, 1 reply; 2+ messages in thread
From: Takayuki 'January June' Suwa @ 2022-12-29 12:14 UTC (permalink / raw)
  To: GCC Patches; +Cc: Max Filippov

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(-)

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
-- 
2.30.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xtensa: Check DF availability before use
  2022-12-29 12:14 ` [PATCH] xtensa: Check DF availability before use Takayuki 'January June' Suwa
@ 2022-12-29 17:13   ` Max Filippov
  0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2022-12-29 17:13 UTC (permalink / raw)
  To: Takayuki 'January June' Suwa; +Cc: GCC Patches

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.

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-29 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1d7667cb-0944-74c6-634b-709be374fc99.ref@yahoo.co.jp>
2022-12-29 12:14 ` [PATCH] xtensa: Check DF availability before use Takayuki 'January June' Suwa
2022-12-29 17:13   ` Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).