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

login
register
mail settings
Submitter Hans-Peter Nilsson
Date July 16, 2012, 3:50 a.m.
Message ID <201207160350.q6G3oijw019839@ignucius.se.axis.com>
Download mbox | patch
Permalink /patch/171126/
State New
Headers show

Comments

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.

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



brgds, H-P

Patch

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)