+2014-07-24 Jiong Wang <jiong.wang@arm.com>
+
+ * config/aarch64/aarch64.h (frame): New fields "wb_candidate1" and
+ "wb_candidate2".
+ * config/aarch64/aarch64.c (aarch64_layout_frame): Initialize above.
+
2014-07-24 Roman Gareev <gareevroman@gmail.com>
* graphite-isl-ast-to-gimple.c:
#define SLOT_NOT_REQUIRED (-2)
#define SLOT_REQUIRED (-1)
+ cfun->machine->frame.wb_candidate1 = FIRST_PSEUDO_REGISTER;
+ cfun->machine->frame.wb_candidate2 = FIRST_PSEUDO_REGISTER;
+
/* First mark all the registers that really need to be saved... */
for (regno = R0_REGNUM; regno <= R30_REGNUM; regno++)
cfun->machine->frame.reg_offset[regno] = SLOT_NOT_REQUIRED;
{
/* FP and LR are placed in the linkage record. */
cfun->machine->frame.reg_offset[R29_REGNUM] = 0;
+ cfun->machine->frame.wb_candidate1 = R29_REGNUM;
cfun->machine->frame.reg_offset[R30_REGNUM] = UNITS_PER_WORD;
+ cfun->machine->frame.wb_candidate2 = R30_REGNUM;
cfun->machine->frame.hardfp_offset = 2 * UNITS_PER_WORD;
offset += 2 * UNITS_PER_WORD;
}
if (cfun->machine->frame.reg_offset[regno] == SLOT_REQUIRED)
{
cfun->machine->frame.reg_offset[regno] = offset;
+ if (cfun->machine->frame.wb_candidate1 == FIRST_PSEUDO_REGISTER)
+ cfun->machine->frame.wb_candidate1 = regno;
+ else if (cfun->machine->frame.wb_candidate2 == FIRST_PSEUDO_REGISTER)
+ cfun->machine->frame.wb_candidate2 = regno;
offset += UNITS_PER_WORD;
}
if (cfun->machine->frame.reg_offset[regno] == SLOT_REQUIRED)
{
cfun->machine->frame.reg_offset[regno] = offset;
+ if (cfun->machine->frame.wb_candidate1 == FIRST_PSEUDO_REGISTER)
+ cfun->machine->frame.wb_candidate1 = regno;
+ else if (cfun->machine->frame.wb_candidate2 == FIRST_PSEUDO_REGISTER
+ && cfun->machine->frame.wb_candidate1 >= V0_REGNUM)
+ cfun->machine->frame.wb_candidate2 = regno;
offset += UNITS_PER_WORD;
}