OSDN Git Service

* doc/extend.texi (MIPS DSP Built-in Functions): Document the DSP
[pf3gnuchains/gcc-fork.git] / gcc / unwind.inc
index 683e94a..b533eb5 100644 (file)
@@ -24,8 +24,8 @@
 
    You should have received a copy of the GNU General Public License
    along with GCC; see the file COPYING.  If not, write to the Free
-   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 /* This is derived from the C++ ABI for IA-64.  Where we diverge
    for cross-architecture compatibility are noted with "@@@".  
@@ -72,8 +72,7 @@ _Unwind_RaiseException_Phase2(struct _Unwind_Exception *exc,
        }
 
       /* Don't let us unwind past the handler context.  */
-      if (match_handler)
-       abort ();
+      gcc_assert (!match_handler);
 
       uw_update_context (context, &fs);
     }
@@ -144,8 +143,8 @@ _Unwind_RaiseException(struct _Unwind_Exception *exc)
 /* Subroutine of _Unwind_ForcedUnwind also invoked from _Unwind_Resume.  */
 
 static _Unwind_Reason_Code
-_Unwind_ForcedUnwind_Phase2(struct _Unwind_Exception *exc,
-                           struct _Unwind_Context *context)
+_Unwind_ForcedUnwind_Phase2 (struct _Unwind_Exception *exc,
+                            struct _Unwind_Context *context)
 {
   _Unwind_Stop_Fn stop = (_Unwind_Stop_Fn) (_Unwind_Ptr) exc->private_1;
   void *stop_argument = (void *) (_Unwind_Ptr) exc->private_2;
@@ -185,8 +184,9 @@ _Unwind_ForcedUnwind_Phase2(struct _Unwind_Exception *exc,
            return _URC_FATAL_PHASE2_ERROR;
        }
 
-      /* Update cur_context to describe the same frame as fs.  */
-      uw_update_context (context, &fs);
+      /* Update cur_context to describe the same frame as fs, and discard
+        the previous context if necessary.  */
+      uw_advance_context (context, &fs);
     }
 
   return code;
@@ -235,8 +235,7 @@ _Unwind_Resume (struct _Unwind_Exception *exc)
   else
     code = _Unwind_ForcedUnwind_Phase2 (exc, &cur_context);
 
-  if (code != _URC_INSTALL_CONTEXT)
-    abort ();
+  gcc_assert (code == _URC_INSTALL_CONTEXT);
 
   uw_install_context (&this_context, &cur_context);
 }
@@ -261,8 +260,7 @@ _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *exc)
 
   code = _Unwind_ForcedUnwind_Phase2 (exc, &cur_context);
 
-  if (code != _URC_INSTALL_CONTEXT)
-    abort ();
+  gcc_assert (code == _URC_INSTALL_CONTEXT);
 
   uw_install_context (&this_context, &cur_context);
 }