]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport a fix to the 2.95 branch
authorBernd Schmidt <bernds@redhat.co.uk>
Fri, 22 Dec 2000 14:25:00 +0000 (14:25 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Fri, 22 Dec 2000 14:25:00 +0000 (14:25 +0000)
From-SVN: r38457

gcc/ChangeLog
gcc/dwarf2.h
gcc/dwarf2out.c
gcc/frame.c

index 0e202f393415485b29b1810229e432b105a4980a..44bf8c2dd5cb17d24ae6e885360c0064a5cebb75 100644 (file)
@@ -1,5 +1,13 @@
 2000-12-22  Bernd Schmidt  <bernds@redhat.co.uk>
 
+       2000-02-08  Geoff Keating  <geoffk@cygnus.com>
+       * dwarf2.h (DW_CFA_GNU_negative_offset_extended): New constant.
+       * dwarf2out.c (dwarf_cfi_name): Print name of new constant.
+       (reg_save): Use DW_CFA_GNU_negative_offset_extended when needed.
+       (output_cfi): Handle output of DW_CFA_GNU_negative_offset_extended.
+       * frame.c (execute_cfa_insn): Handle
+       DW_CFA_GNU_negative_offset_extended.
+
        2000-03-06  Mark Mitchell  <mark@codesourcery.com>
        * function.c (free_temps_for_rtl_expr): Don't free slots
        that have been pushed into a higher level.
index ddbe1b823bba5880dcb31da8e5b57f88c274b065..d0ca2451b7697ea903568f599327ce1766be6bc9 100644 (file)
@@ -1,6 +1,7 @@
 /* Declarations and definitions of codes relating to the DWARF2 symbolic
    debugging information format.
-   Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1993, 1995, 1996, 1997, 2000 
+   Free Software Foundation, Inc.
    Contributed by Gary Funck (gary@intrepid.com).  Derived from the
    DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com).
 
@@ -501,7 +502,8 @@ enum dwarf_call_frame_info
 
     /* GNU extensions */
     DW_CFA_GNU_window_save = 0x2d,
-    DW_CFA_GNU_args_size = 0x2e
+    DW_CFA_GNU_args_size = 0x2e,
+    DW_CFA_GNU_negative_offset_extended = 0x2f
   };
 
 #define DW_CIE_ID        0xffffffff
index de3d26fcb34714f87b3090e969ca44e7a425136c..30df09d7c28e680d8ee730dd60d92e017c98fb7e 100644 (file)
@@ -719,6 +719,8 @@ dwarf_cfi_name (cfi_opc)
       return "DW_CFA_GNU_window_save";
     case DW_CFA_GNU_args_size:
       return "DW_CFA_GNU_args_size";
+    case DW_CFA_GNU_negative_offset_extended:
+      return "DW_CFA_GNU_negative_offset_extended";
 
     default:
       return "DW_CFA_<unknown>";
@@ -948,7 +950,10 @@ reg_save (label, reg, sreg, offset)
 
       offset /= DWARF_CIE_DATA_ALIGNMENT;
       if (offset < 0)
-       abort ();
+       {
+         cfi->dw_cfi_opc = DW_CFA_GNU_negative_offset_extended;
+         offset = -offset;
+       }
       cfi->dw_cfi_oprnd2.dw_cfi_offset = offset;
     }
   else
@@ -1635,6 +1640,7 @@ output_cfi (cfi, fde)
          break;
 #endif
        case DW_CFA_offset_extended:
+       case DW_CFA_GNU_negative_offset_extended:
        case DW_CFA_def_cfa:
          output_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_reg_num);
           fputc ('\n', asm_out_file);
index b5f643e7043774907134600410eaab0507bb7a1f..4dabf119b82521ef9614f2e4a0ba5b5bb4b7db4f 100644 (file)
@@ -714,6 +714,14 @@ execute_cfa_insn (void *p, struct frame_state_internal *state,
       state->s.args_size = offset;
       break;
 
+    case DW_CFA_GNU_negative_offset_extended:
+      p = decode_uleb128 (p, &reg);
+      p = decode_uleb128 (p, &offset);
+      offset *= info->data_align;
+      state->s.saved[reg] = REG_SAVED_OFFSET;
+      state->s.reg_or_offset[reg] = -offset;
+      break;
+
     default:
       abort ();
     }