2014-10-15 Joern Rennecke <joern.rennecke@embecosm.com>
Jeff Law <law@redhat.com>
* caller-save.c (replace_reg_with_saved_mem): If saved_mode covers
multiple hard registers, use smaller mode derived from MODE.
Co-Authored-By: Jeff Law <law@redhat.com>
From-SVN: r216243
+2014-10-15 Joern Rennecke <joern.rennecke@embecosm.com>
+ Jeff Law <law@redhat.com>
+
+ * caller-save.c (replace_reg_with_saved_mem): If saved_mode covers
+ multiple hard registers, use smaller mode derived from MODE.
+
2014-10-15 Andreas Schwab <schwab@suse.de>
* explow.c (convert_memory_address_addr_space_1): Mark in_const
}
else
{
- gcc_assert (save_mode[regno] != VOIDmode);
- XVECEXP (mem, 0, i) = gen_rtx_REG (save_mode [regno],
- regno + i);
+ enum machine_mode smode = save_mode[regno];
+ gcc_assert (smode != VOIDmode);
+ if (hard_regno_nregs [regno][smode] > 1)
+ smode = mode_for_size (GET_MODE_SIZE (mode) / nregs,
+ GET_MODE_CLASS (mode), 0);
+ XVECEXP (mem, 0, i) = gen_rtx_REG (smode, regno + i);
}
}