Patchwork [DWARF] Fix multiple register spanning location.

login
register
mail settings
Submitter Cary Coutant
Date April 30, 2013, 7:05 p.m.
Message ID <CAHACq4owk4PQ9PMTM+5m-z+MR707AZCrSy27+wsVVAz_4jyYYA@mail.gmail.com>
Download mbox | patch
Permalink /patch/240681/
State New
Headers show

Comments

Cary Coutant - April 30, 2013, 7:05 p.m.
2013-04-26  Christian Bruel  <christian.bruel@st.com>

        * dwarf2out.c (multiple_reg_loc_descriptor): Use DBX_REGISTER_NUMBER
        for spaning registers.

s/spaning/spanning/




How about using dbx_reg_number (XVECEXP (regs, 0, i)) instead? The
bare use of DBX_REGISTER_NUMBER earlier in that function is protected
by a gcc_assert, but this one isn't.

-cary

Patch

Index: dwarf2out.c
===================================================================
--- dwarf2out.c (revision 198287)
+++ dwarf2out.c (working copy)
@@ -10656,7 +10656,8 @@  multiple_reg_loc_descriptor (rtx rtl, rtx regs,
     {
       dw_loc_descr_ref t;

-      t = one_reg_loc_descriptor (REGNO (XVECEXP (regs, 0, i)),
+      reg = REGNO (XVECEXP (regs, 0, i));
+      t = one_reg_loc_descriptor (DBX_REGISTER_NUMBER (reg),
                                   VAR_INIT_STATUS_INITIALIZED);
       add_loc_descr (&loc_result, t);
       size = GET_MODE_SIZE (GET_MODE (XVECEXP (regs, 0, 0)));