dwarf2cfi: Implement change_cfi_row.
authorRichard Henderson <rth@redhat.com>
Sat, 23 Jul 2011 20:17:54 +0000 (13:17 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 23 Jul 2011 20:17:54 +0000 (13:17 -0700)
commit57e16c9625e094c687dbf8eef226905b48b26541
treeb4bce59406cfba4cec2473ceaacbd2e3ea2d99fb
parentf1a0e8300d7ee346adb69555ec4c930c89fb3997
dwarf2cfi: Implement change_cfi_row.

Add a generic function to adjust cfi state from one row to another.
Use this to implement text section switching.  This will also be
usable for arbitrary changes around a cfg for shrink-wrapping.

        * dwarf2cfi.c (add_cfi_args_size): Split out from...
        (dwarf2out_args_size): ... here.
        (add_cfi_restore): Split out from ...
        (dwarf2out_frame_debug_cfa_restore): ... here.
        (def_cfa_0): Split out from ...
        (def_cfa_1): ... here.
        (cfi_oprnd_equal_p, cfi_equal_p): New.
        (change_cfi_row): New.
        (add_cfis_to_fde): Set fde->dw_fde_switch_cfi_index.
        (create_cfi_notes): Use change_cfi_row at SWITCH_TEXT note.
        (output_cfis): Remove.
        * dwarf2out.c (output_fde): Simplify output_cfi loop.
        (dwarf2out_switch_text_section): Don't call output_cfis.
        (dw_val_equal_p, loc_descr_equal_p_1, loc_descr_equal_p): New.
        * dwarf2out.h: Update decls.
        (enum dw_val_class): Add dw_val_class_none.

From-SVN: r176700
gcc/ChangeLog
gcc/dwarf2cfi.c
gcc/dwarf2out.c
gcc/dwarf2out.h