public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4916] xtensa: Check DF availability before use
@ 2022-12-29 17:12 Max Filippov
  0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2022-12-29 17:12 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:65fed695f7b2eb99dfd679fbdfcf510104de2fb8

commit r13-4916-g65fed695f7b2eb99dfd679fbdfcf510104de2fb8
Author: Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Date:   Thu Dec 29 21:14:33 2022 +0900

    xtensa: Check DF availability before use
    
    Perhaps no problem, but for safety.
    
    gcc/ChangeLog:
    
            * config/xtensa/xtensa.cc (xtensa_expand_prologue): Fix to check
            DF availability before use of DF_* macros.

Diff:
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-29 17:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-29 17:12 [gcc r13-4916] xtensa: Check DF availability before use 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).