OSDN Git Service

2006-02-07 Alexandre Oliva <aoliva@redhat.com>
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Feb 2006 06:51:39 +0000 (06:51 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Feb 2006 06:51:39 +0000 (06:51 +0000)
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.

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

gcc/ChangeLog
gcc/config/ia64/ia64.h
gcc/config/ia64/unwind-ia64.c

index 8dbea4e..94ba946 100644 (file)
@@ -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.
index 7eff2a2..0ec6c96 100644 (file)
@@ -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
 
 \f
 /* Register That Address the Stack Frame.  */
index 67d69b3..302f0d1 100644 (file)
@@ -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;