]> gcc.gnu.org Git - gcc.git/commitdiff
dwarf2out.c (build_cfa_loc): Correct to use DW_OP_regx or DW_OP_bregx when cfa->reg...
authorHans-Peter Nilsson <hp@bitrange.com>
Fri, 6 Oct 2000 11:37:31 +0000 (11:37 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Fri, 6 Oct 2000 11:37:31 +0000 (11:37 +0000)
* dwarf2out.c (build_cfa_loc): Correct to use DW_OP_regx or
DW_OP_bregx when cfa->reg > 31.

* frame-dwarf2.c (decode_stack_op) [case DW_OP_regx]: Add missing
break.

From-SVN: r36757

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

index a33743dfb18b12b40a2a99c0b7efb89a4bbc9e7d..f4abd1314d7b275809b8ed681d498b110aa7a169 100644 (file)
@@ -1,3 +1,11 @@
+2000-10-06  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * dwarf2out.c (build_cfa_loc): Correct to use DW_OP_regx or
+       DW_OP_bregx when cfa->reg > 31.
+
+       * frame-dwarf2.c (decode_stack_op) [case DW_OP_regx]: Add missing
+       break.
+
 2000-10-05  Richard Henderson  <rth@cygnus.com>
 
        * c-decl.c (warn_missing_noreturn): Remove.
index 4e520fefc1c7f69cd657dfb89e7654fdafc44af9..a73b2cc11ecea83e84283fcaf9c9cf78bb6bae0c 100644 (file)
@@ -2827,9 +2827,16 @@ build_cfa_loc (cfa)
     abort ();
 
   if (cfa->base_offset)
-    head = new_loc_descr (DW_OP_breg0 + cfa->reg, cfa->base_offset, 0);
-  else
+    {
+      if (cfa->reg <= 31)
+       head = new_loc_descr (DW_OP_breg0 + cfa->reg, cfa->base_offset, 0);
+      else
+       head = new_loc_descr (DW_OP_bregx, cfa->reg, cfa->base_offset);
+    }
+  else if (cfa->reg <= 31)
     head = new_loc_descr (DW_OP_reg0 + cfa->reg, 0, 0);
+  else
+    head = new_loc_descr (DW_OP_regx, cfa->reg, 0);
   head->dw_loc_oprnd1.val_class = dw_val_class_const;
   tmp = new_loc_descr (DW_OP_deref, 0, 0);
   add_loc_descr (&head, tmp);
index 52db16f577e3bad0d062b11ac01510c7f8695e22..459af6d918a0b58ac96b0c9772019ee9801424a6 100644 (file)
@@ -514,6 +514,7 @@ decode_stack_op (unsigned char *buf, struct frame_state *state)
     case DW_OP_regx:
       buf = decode_sleb128 (buf, &offset);
       state->cfa_reg = offset;
+      break;
     case DW_OP_breg0:
     case DW_OP_breg1:
     case DW_OP_breg2:
This page took 0.080333 seconds and 5 git commands to generate.