]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
xtensa: Check DF availability before use
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Thu, 29 Dec 2022 12:14:33 +0000 (21:14 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 29 Dec 2022 15:04:25 +0000 (07:04 -0800)
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.

gcc/config/xtensa/xtensa.cc

index 66e253495211c7772fd65183b86b32d7146610d6..e726a115029fdc7eeaee9a3769673fb304e50c79 100644 (file)
@@ -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