This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed, MMIX: fix movcc_expanded alternatives.


Because mmix.h:
#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
all non-empty register classes *must* be handled in
move-patterns; it's not enough just listing matching
GENERAL_REGS alternatives.  The missing class is the
single-register division-remainder class!  GCC wants that for
CCmode at -O2 and -O3 for gcc.c-torture/compile/20001226-1.c.
That's the test-case which comes and goes.  It used to(?) fail
because it ate too much core or timed out compilation, so I
didn't pay attention coming from a build failure situation.
Tested with no regressions.

	* config/mmix/mmix.md ("*movcc_expanded"): Add missing alternatives.

Index: mmix.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.md,v
retrieving revision 1.20
diff -p -c -r1.20 mmix.md
*** mmix.md	6 Mar 2003 05:01:15 -0000	1.20
--- mmix.md	8 Mar 2003 17:17:29 -0000
***************
*** 139,150 ****
  ;; we treat them as signed entities; see mmix-modes.def.  The following
  ;; expanders should cover all MODE_CC modes, and expand for this pattern.
  (define_insn "*movcc_expanded"
!   [(set (match_operand 0 "nonimmediate_operand" "=r,r,m")
! 	(match_operand 1 "nonimmediate_operand"  "r,m,r"))]
    "GET_MODE_CLASS (GET_MODE (operands[0])) == MODE_CC
     && GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_CC"
    "@
     SET %0,%1
     LDT %0,%1
     STT %1,%0")

--- 139,152 ----
  ;; we treat them as signed entities; see mmix-modes.def.  The following
  ;; expanders should cover all MODE_CC modes, and expand for this pattern.
  (define_insn "*movcc_expanded"
!   [(set (match_operand 0 "nonimmediate_operand" "=r,x,r,r,m")
! 	(match_operand 1 "nonimmediate_operand"  "r,r,x,m,r"))]
    "GET_MODE_CLASS (GET_MODE (operands[0])) == MODE_CC
     && GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_CC"
    "@
     SET %0,%1
+    PUT %0,%1
+    GET %0,%1
     LDT %0,%1
     STT %1,%0")


brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]