2013-04-26 Christian Bruel <christian.bruel@st.com>
* dwarf2out.c (multiple_reg_loc_descriptor): Use DBX_REGISTER_NUMBER
for spaning registers.
2013-04-26 Christian Bruel <christian.bruel@st.com>
* gcc.dg/debug/dwarf2/dwarf_span.c: New test case.
===================================================================
@@ -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)));
===================================================================
@@ -0,0 +1,18 @@
+/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-require-effective-target hard_float } */
+/* { dg-options "-g -dA" } */
+/* { dg-final { scan-assembler-times "DW_OP_regx" 4 } } */
+
+double
+add_double (register double u, register double v)
+{
+ return u + v;
+}
+
+double
+wack_double (register double u, register double v)
+{
+ register double l = u, r = v;
+ l = add_double (l, r);
+ return l + r;
+}