Commit 7f26e60c by Jeff Law

Fix stdarg-3 regression on xstormy16 port

	PR rtl-optimization/92264
	* config/stormy16/stormy16.c (xstormy16_preferred_reload_class): Handle
	reloading of auto-increment addressing modes.
parent 0c809f72
2020-04-03 Jeff Law <law@redhat.com>
PR rtl-optimization/92264
* config/stormy16/stormy16.c (xstormy16_preferred_reload_class): Handle
reloading of auto-increment addressing modes.
2020-04-03 H.J. Lu <hongjiu.lu@intel.com> 2020-04-03 H.J. Lu <hongjiu.lu@intel.com>
PR target/94467 PR target/94467
......
...@@ -497,7 +497,17 @@ xstormy16_secondary_reload_class (enum reg_class rclass, ...@@ -497,7 +497,17 @@ xstormy16_secondary_reload_class (enum reg_class rclass,
static reg_class_t static reg_class_t
xstormy16_preferred_reload_class (rtx x, reg_class_t rclass) xstormy16_preferred_reload_class (rtx x, reg_class_t rclass)
{ {
if (rclass == GENERAL_REGS && MEM_P (x)) /* Only the first eight registers can be moved to/from memory.
So those prefer EIGHT_REGS.
Similarly reloading an auto-increment address is going to
require loads and stores, so we must use EIGHT_REGS for those
too. */
if (rclass == GENERAL_REGS
&& (MEM_P (x)
|| GET_CODE (x) == POST_INC
|| GET_CODE (x) == PRE_DEC
|| GET_CODE (x) == PRE_MODIFY))
return EIGHT_REGS; return EIGHT_REGS;
return rclass; return rclass;
......
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