Fixing gcc.c-torture/compile/pr44707.c for CRIS v32 1/2.

Submitted by Hans-Peter Nilsson on July 16, 2012, 3:50 a.m.


Message ID
State New
Headers show

Commit Message

Hans-Peter Nilsson July 16, 2012, 3:50 a.m.
Buglet in cris_preferred_reload_class, incidental, apparently
without effect at least regarding failing test-cases.  A class
disjunct from the input was returned as "preferred".  It could
arguably be gcc_asserted as a sanity-check by the caller that
the returned class is a subset of the original class.  ...and I
guess I'll add such a gcc_assert *inside*
cris_preferred_reload_class.  Later.  No regressions, cris-elf
and crisv32-elf.  Committed.

	* config/cris/cris.c (cris_preferred_reload_class):
	Don't return GENERAL_REGS as preferred to MOF_SRP_REGS.

brgds, H-P

Patch hide | download patch | download mbox

Index: gcc/config/cris/cris.c
--- gcc/config/cris/cris.c	(revision 189470)
+++ gcc/config/cris/cris.c	(working copy)
@@ -1503,6 +1550,7 @@  cris_preferred_reload_class (rtx x ATTRI
   if (rclass != ACR_REGS
       && rclass != MOF_REGS
+      && rclass != MOF_SRP_REGS
       && rclass != SRP_REGS
       && rclass != CC0_REGS
       && rclass != SPECIAL_REGS)