aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2006-02-07 06:51:39 +0000
committerJakub Jelinek <jakub@gcc.gnu.org>2006-02-07 07:51:39 +0100
commita58b03427c79a8c3da19a06cd0c59df06b0b3e7f (patch)
tree639c982f79badea45d2df9ea9e64fd609ce3d9ce
parentb38a05d08306bd2a0b81e1a59e0d7b3d66ddaca2 (diff)
downloadgcc-a58b03427c79a8c3da19a06cd0c59df06b0b3e7f.zip
gcc-a58b03427c79a8c3da19a06cd0c59df06b0b3e7f.tar.gz
gcc-a58b03427c79a8c3da19a06cd0c59df06b0b3e7f.tar.bz2
re PR debug/24444 (invalid register in debug info)
2006-02-07 Alexandre Oliva <aoliva@redhat.com> PR debug/24444 * config/ia64/unwind-ia64.c: Revert last change. * config/ia64/ia64.h (ARG_POINTER_CFA_OFFSET): Removed. (INCOMING_FRAME_SP_OFFSET): Define. From-SVN: r110688
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/ia64/ia64.h10
-rw-r--r--gcc/config/ia64/unwind-ia64.c4
3 files changed, 12 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8dbea4e..94ba946 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2006-02-07 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/24444
+ * config/ia64/unwind-ia64.c: Revert last change.
+ * config/ia64/ia64.h (ARG_POINTER_CFA_OFFSET): Removed.
+ (INCOMING_FRAME_SP_OFFSET): Define.
+
2006-02-06 Roger Sayle <roger@eyesopen.com>
* config/ia64/ia64.c (hfa_element_mode): Don't handle CHAR_TYPE.
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 7eff2a2..0ec6c96 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -981,12 +981,6 @@ enum reg_class
On some machines it may depend on the data type of the function. */
#define FIRST_PARM_OFFSET(FUNDECL) 0
-/* The CFA is defined as the SP at the call site, so we have to take
- into account that the first argument pointer is
- STACK_POINTER_OFFSET bytes off the stack pointer. */
-#define ARG_POINTER_CFA_OFFSET(FNDECL) \
- (FIRST_PARM_OFFSET (FNDECL) - STACK_POINTER_OFFSET)
-
/* A C expression whose value is RTL representing the value of the return
address for the frame COUNT steps up from the current frame, after the
prologue. */
@@ -1022,7 +1016,9 @@ enum reg_class
beginning of any function, before the prologue. The top of the frame is
defined to be the value of the stack pointer in the previous frame, just
before the call instruction. */
-#define INCOMING_FRAME_SP_OFFSET 0
+/* The CFA is past the red zone, not at the entry-point stack
+ pointer. */
+#define INCOMING_FRAME_SP_OFFSET STACK_POINTER_OFFSET
/* Register That Address the Stack Frame. */
diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c
index 67d69b3..302f0d1 100644
--- a/gcc/config/ia64/unwind-ia64.c
+++ b/gcc/config/ia64/unwind-ia64.c
@@ -2067,7 +2067,7 @@ uw_advance_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
}
/* Fill in CONTEXT for top-of-stack. The only valid registers at this
- level will be the return address and the CFA. */
+ level will be the return address and the CFA. Note that CFA = SP+16. */
#define uw_init_context(CONTEXT) \
do { \
@@ -2083,7 +2083,7 @@ uw_init_context_1 (struct _Unwind_Context *context, void *bsp)
{
void *rp = __builtin_extract_return_addr (__builtin_return_address (0));
/* Set psp to the caller's stack pointer. */
- void *psp = __builtin_dwarf_cfa ();
+ void *psp = __builtin_dwarf_cfa () - 16;
_Unwind_FrameState fs;
unsigned long rnat, tmp1, tmp2;