* unwind-dw2.c (execute_cfa_program): Use < again.
authorJason Merrill <jason@redhat.com>
Mon, 7 Jan 2002 22:41:42 +0000 (17:41 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 7 Jan 2002 22:41:42 +0000 (17:41 -0500)
From-SVN: r48617

gcc/ChangeLog
gcc/unwind-dw2.c

index 6f8967fe617d00fe452adbe6ed496f0449d2e1c8..a13b5b2adaca9bedf7ba184f15cc731875515353 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-07  Jason Merrill  <jason@redhat.com>
+
+       * unwind-dw2.c (execute_cfa_program): Use < again.
+
 2002-01-07  Jakub Jelinek  <jakub@redhat.com>
 
        * predict.c (combine_predictions_for_insn): Avoid division by zero.
index c2619bd88985d6c5b6deeb1e4a877ffdf1741c60..ef9b33bddbf33497a5304d6b7c7a78d0026fe621 100644 (file)
@@ -705,7 +705,14 @@ execute_cfa_program (const unsigned char *insn_ptr,
   /* Don't allow remember/restore between CIE and FDE programs.  */
   fs->regs.prev = NULL;
 
-  while (insn_ptr < insn_end && fs->pc <= context->ra)
+  /* The comparison with the return address uses < rather than <= because
+     we are only interested in the effects of code before the call; for a
+     noreturn function, the return address may point to unrelated code with
+     a different stack configuration that we are not interested in.  We
+     assume that the call itself is unwind info-neutral; if not, or if
+     there are delay instructions that adjust the stack, these must be
+     reflected at the point immediately before the call insn.  */
+  while (insn_ptr < insn_end && fs->pc < context->ra)
     {
       unsigned char insn = *insn_ptr++;
       _Unwind_Word reg, utmp;