always define SETUP_FRAME_ADDRESSES
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 Oct 2015 00:48:02 +0000 (00:48 +0000)
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 Oct 2015 00:48:02 +0000 (00:48 +0000)
gcc/ChangeLog:

2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* defaults.h (SETUP_FRAME_ADDRESSES): New default definition.
* builtins.c (expand_builtin_return_addr): Adjust.
* doc/tm.texi: Likewise.
* doc/tm.texi.in: Likewise.
* except.c (expand_builtin_unwind_init): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228686 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/builtins.c
gcc/defaults.h
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/except.c

index 5da4a5d..0d9ab5c 100644 (file)
@@ -1,5 +1,13 @@
 2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
+       * defaults.h (SETUP_FRAME_ADDRESSES): New default definition.
+       * builtins.c (expand_builtin_return_addr): Adjust.
+       * doc/tm.texi: Likewise.
+       * doc/tm.texi.in: Likewise.
+       * except.c (expand_builtin_unwind_init): Likewise.
+
+2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
        * builtins.c (expand_builtin_return_addr): Adjust.
        * defaults.h (INITIAL_FRAME_ADDRESS_RTX): New default definition.
 
index 3bbe763..bd95acb 100644 (file)
@@ -784,13 +784,8 @@ expand_builtin_return_addr (enum built_in_function fndecl_code, int count)
        }
     }
 
-  /* Some machines need special handling before we can access
-     arbitrary frames.  For example, on the SPARC, we must first flush
-     all register windows to the stack.  */
-#ifdef SETUP_FRAME_ADDRESSES
   if (count > 0)
     SETUP_FRAME_ADDRESSES ();
-#endif
 
   /* On the SPARC, the return address is not in the frame, it is in a
      register.  There is no way to access it off of the current frame
index c4d9536..5f1ea76 100644 (file)
@@ -1281,6 +1281,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define INITIAL_FRAME_ADDRESS_RTX NULL
 #endif
 
+#ifndef SETUP_FRAME_ADDRESSES
+#define SETUP_FRAME_ADDRESSES() do { } while (0)
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
index 72366b9..d09e646 100644 (file)
@@ -3020,11 +3020,11 @@ address of the stack word that points to the previous frame.
 @end defmac
 
 @defmac SETUP_FRAME_ADDRESSES
-If defined, a C expression that produces the machine-specific code to
+A C expression that produces the machine-specific code to
 setup the stack so that arbitrary frames can be accessed.  For example,
 on the SPARC, we must flush all of the register windows to the stack
 before we can access arbitrary stack frames.  You will seldom need to
-define this macro.
+define this macro.  The default is to do nothing.
 @end defmac
 
 @deftypefn {Target Hook} rtx TARGET_BUILTIN_SETJMP_FRAME_VALUE (void)
index d8d0087..33939ec 100644 (file)
@@ -2626,11 +2626,11 @@ address of the stack word that points to the previous frame.
 @end defmac
 
 @defmac SETUP_FRAME_ADDRESSES
-If defined, a C expression that produces the machine-specific code to
+A C expression that produces the machine-specific code to
 setup the stack so that arbitrary frames can be accessed.  For example,
 on the SPARC, we must flush all of the register windows to the stack
 before we can access arbitrary stack frames.  You will seldom need to
-define this macro.
+define this macro.  The default is to do nothing.
 @end defmac
 
 @hook TARGET_BUILTIN_SETJMP_FRAME_VALUE
index fed18ee..8f77653 100644 (file)
@@ -2120,9 +2120,7 @@ expand_builtin_unwind_init (void)
      able to copy the saved values for any registers from frames we unwind.  */
   crtl->saves_all_registers = 1;
 
-#ifdef SETUP_FRAME_ADDRESSES
   SETUP_FRAME_ADDRESSES ();
-#endif
 }
 
 /* Map a non-negative number to an eh return data register number; expands