OSDN Git Service

* toplev.c (dump_memory_report): Call dump_vec_loc_statistics.
[pf3gnuchains/gcc-fork.git] / gcc / unwind-dw2.c
index b40b16f..1bea1b3 100644 (file)
@@ -636,6 +636,16 @@ execute_stack_op (const unsigned char *op_ptr, const unsigned char *op_end,
          result = stack[stack_elt - 2];
          break;
 
+       case DW_OP_swap:
+         {
+           _Unwind_Word t;
+           gcc_assert (stack_elt >= 2);
+           t = stack[stack_elt - 1];
+           stack[stack_elt - 1] = stack[stack_elt - 2];
+           stack[stack_elt - 2] = t;
+           goto no_push;
+         }
+
        case DW_OP_rot:
          {
            _Unwind_Word t1, t2, t3;
@@ -1131,11 +1141,11 @@ uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs)
     return _URC_FATAL_PHASE1_ERROR;
 
   /* First decode all the insns in the CIE.  */
-  end = (unsigned char *) next_fde ((struct dwarf_fde *) cie);
+  end = (const unsigned char *) next_fde ((const struct dwarf_fde *) cie);
   execute_cfa_program (insn, end, context, fs);
 
   /* Locate augmentation for the fde.  */
-  aug = (unsigned char *) fde + sizeof (*fde);
+  aug = (const unsigned char *) fde + sizeof (*fde);
   aug += 2 * size_of_encoded_value (fs->fde_encoding);
   insn = NULL;
   if (fs->saw_z)
@@ -1155,7 +1165,7 @@ uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs)
   /* Then the insns in the FDE up to our target PC.  */
   if (insn == NULL)
     insn = aug;
-  end = (unsigned char *) next_fde (fde);
+  end = (const unsigned char *) next_fde (fde);
   execute_cfa_program (insn, end, context, fs);
 
   return _URC_NO_REASON;
@@ -1516,7 +1526,7 @@ uw_install_context_1 (struct _Unwind_Context *current,
 static inline _Unwind_Ptr
 uw_identify_context (struct _Unwind_Context *context)
 {
-  return _Unwind_GetIP (context);
+  return _Unwind_GetCFA (context);
 }