diff options
author | Hans-Peter Nilsson <hp@bitrange.com> | 2000-10-06 11:37:31 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2000-10-06 11:37:31 +0000 |
commit | f299afab9b5479f9eaf8628dde4db4e5403aa9a6 (patch) | |
tree | 81588a1d31f893afc4e0c98e4e2b6cc124aa6a63 | |
parent | 903cef853fd04ab6ff24672cba7b096ccb69f2ce (diff) | |
download | gcc-f299afab9b5479f9eaf8628dde4db4e5403aa9a6.zip gcc-f299afab9b5479f9eaf8628dde4db4e5403aa9a6.tar.gz gcc-f299afab9b5479f9eaf8628dde4db4e5403aa9a6.tar.bz2 |
dwarf2out.c (build_cfa_loc): Correct to use DW_OP_regx or DW_OP_bregx when cfa->reg > 31.
* 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
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 11 | ||||
-rw-r--r-- | gcc/frame-dwarf2.c | 1 |
3 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a33743d..f4abd13 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4e520fe..a73b2cc 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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); diff --git a/gcc/frame-dwarf2.c b/gcc/frame-dwarf2.c index 52db16f5..459af6d 100644 --- a/gcc/frame-dwarf2.c +++ b/gcc/frame-dwarf2.c @@ -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: |