gcc/
* doc/tm.texi (ARG_POINTER_CFA_OFFSET): Document new default.
* defaults.h (ARG_POINTER_CFA_OFFSET): Add pretend_args_size.
* config/spu/spu.h (ARG_POINTER_CFA_OFFSET): Add pretend_args_size.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155396
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-12-22 Paul Brook <paul@codesourcery.com>
+
+ * doc/tm.texi (ARG_POINTER_CFA_OFFSET): Document new default.
+ * defaults.h (ARG_POINTER_CFA_OFFSET): Add pretend_args_size.
+ * config/spu/spu.h (ARG_POINTER_CFA_OFFSET): Add pretend_args_size.
+
2009-12-21 Brian Hackett <bhackett1024@gmail.com>
* plugin.def: Rename pre-genericize event.
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (LINK_REGISTER_REGNUM)
-#define ARG_POINTER_CFA_OFFSET(FNDECL) (-STACK_POINTER_OFFSET)
+#define ARG_POINTER_CFA_OFFSET(FNDECL) \
+ (crtl->args.pretend_args_size - STACK_POINTER_OFFSET)
\f
/* Stack Checking */
/* On most machines, the CFA coincides with the first incoming parm. */
#ifndef ARG_POINTER_CFA_OFFSET
-#define ARG_POINTER_CFA_OFFSET(FNDECL) FIRST_PARM_OFFSET (FNDECL)
+#define ARG_POINTER_CFA_OFFSET(FNDECL) \
+ (FIRST_PARM_OFFSET (FNDECL) + crtl->args.pretend_args_size)
#endif
/* On most machines, we use the CFA as DW_AT_frame_base. */
@code{INCOMING_FRAME_SP_OFFSET}. Which is unfortunately not usable
during virtual register instantiation.
-The default value for this macro is @code{FIRST_PARM_OFFSET (fundecl)},
+The default value for this macro is
+@code{FIRST_PARM_OFFSET (fundecl) + crtl->args.pretend_args_size},
which is correct for most machines; in general, the arguments are found
immediately before the stack frame. Note that this is not the case on
some targets that save registers into the caller's frame, such as SPARC