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]

[patch] mn10300: Remove "invert" from cc.


Hi,

Attached is a patch to remove "invert" from cc as it is unused.

This used to be used when "add" instruction was part of "compare"
pattern, but later that moved to a peephole as "add" clobbers its
destination operand (as far as I can tell from the CVS history).

Built mn10300-elf.  OK to apply?

Kazu Hirata

2004-03-07  Kazu Hirata  <kazu@cs.umass.edu>

	* config/mn10300/mn10300.c (notice_update_cc): Don't handle
	CC_INVERT.
	* config/mn10300/mn10300.md (cc): Remove "invert".

Index: mn10300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mn10300/mn10300.c,v
retrieving revision 1.66
diff -u -r1.66 mn10300.c
--- mn10300.c	8 Feb 2004 23:08:43 -0000	1.66
+++ mn10300.c	7 Mar 2004 17:43:46 -0000
@@ -1198,13 +1198,6 @@
 	cc_status.mdep.fpCC = 1;
       break;
 
-    case CC_INVERT:
-      /* The insn is a compare instruction.  */
-      CC_STATUS_INIT;
-      cc_status.value1 = SET_SRC (body);
-      cc_status.flags |= CC_INVERTED;
-      break;
-
     case CC_CLOBBER:
       /* Insn doesn't leave CC in a usable state.  */
       CC_STATUS_INIT;
Index: mn10300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mn10300/mn10300.md,v
retrieving revision 1.54
diff -u -r1.54 mn10300.md
--- mn10300.md	4 Feb 2004 19:15:24 -0000	1.54
+++ mn10300.md	7 Mar 2004 17:43:51 -0000
@@ -33,9 +33,8 @@
 ;; set_znv - insn sets z,n,v to usable values; c is unusable.
 ;; set_zn  - insn sets z,n to usable values; v,c are unusable.
 ;; compare - compare instruction
-;; invert -- like compare, but flags are inverted.
 ;; clobber - value of cc is unknown
-(define_attr "cc" "none,none_0hit,set_znv,set_zn,compare,clobber,invert"
+(define_attr "cc" "none,none_0hit,set_znv,set_zn,compare,clobber"
   (const_string "clobber"))
 
 (define_constants [


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