Commit 74e25e34 by Eric Botcazou Committed by Eric Botcazou

arm.c (arm_dwarf_register_span): Take into account the endianness of the D…

arm.c (arm_dwarf_register_span): Take into account the endianness of the D registers for the legacy encodings.

	* config/arm/arm.c (arm_dwarf_register_span): Take into account the
	endianness of the D registers for the legacy encodings.

From-SVN: r205118
parent c34fb198
2013-11-20 Eric Botcazou <ebotcazou@adacore.com>
* config/arm/arm.c (arm_dwarf_register_span): Take into account the
endianness of the D registers for the legacy encodings.
2013-11-20 Richard Earnshaw <rearnsha@arm.com> 2013-11-20 Richard Earnshaw <rearnsha@arm.com>
PR rtl-optimization/54300 PR rtl-optimization/54300
...@@ -27992,10 +27992,11 @@ arm_dbx_register_number (unsigned int regno) ...@@ -27992,10 +27992,11 @@ arm_dbx_register_number (unsigned int regno)
static rtx static rtx
arm_dwarf_register_span (rtx rtl) arm_dwarf_register_span (rtx rtl)
{ {
enum machine_mode mode;
unsigned regno; unsigned regno;
rtx parts[8];
int nregs; int nregs;
int i; int i;
rtx p;
regno = REGNO (rtl); regno = REGNO (rtl);
if (!IS_VFP_REGNUM (regno)) if (!IS_VFP_REGNUM (regno))
...@@ -28008,15 +28009,33 @@ arm_dwarf_register_span (rtx rtl) ...@@ -28008,15 +28009,33 @@ arm_dwarf_register_span (rtx rtl)
corresponding D register. Until GDB supports this, we shall use the corresponding D register. Until GDB supports this, we shall use the
legacy encodings. We also use these encodings for D0-D15 for legacy encodings. We also use these encodings for D0-D15 for
compatibility with older debuggers. */ compatibility with older debuggers. */
if (VFP_REGNO_OK_FOR_SINGLE (regno)) mode = GET_MODE (rtl);
if (GET_MODE_SIZE (mode) < 8)
return NULL_RTX; return NULL_RTX;
nregs = GET_MODE_SIZE (GET_MODE (rtl)) / 8; if (VFP_REGNO_OK_FOR_SINGLE (regno))
p = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (nregs)); {
for (i = 0; i < nregs; i++) nregs = GET_MODE_SIZE (mode) / 4;
XVECEXP (p, 0, i) = gen_rtx_REG (DImode, regno + i); for (i = 0; i < nregs; i += 2)
if (TARGET_BIG_END)
{
parts[i] = gen_rtx_REG (SImode, regno + i + 1);
parts[i + 1] = gen_rtx_REG (SImode, regno + i);
}
else
{
parts[i] = gen_rtx_REG (SImode, regno + i);
parts[i + 1] = gen_rtx_REG (SImode, regno + i + 1);
}
}
else
{
nregs = GET_MODE_SIZE (mode) / 8;
for (i = 0; i < nregs; i++)
parts[i] = gen_rtx_REG (DImode, regno + i);
}
return p; return gen_rtx_PARALLEL (VOIDmode, gen_rtvec_v (nregs , parts));
} }
#if ARM_UNWIND_INFO #if ARM_UNWIND_INFO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment