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]

[PATCH] patches for combine.c and haifa-sched.c in gcc-2.95.4


Hi.

Here's two small patches for gcc-2.95.4. The combine.c patch
is based on observations by Zack Weinberg and comments by
Richard Kenner.  The thread can be read by following the link ...

http://gcc.gnu.org/ml/gcc/2001-08/msg00932.html

The haifa-sched.c patch I saw posted long ago on the patches
mailing list, but seemed to be dropped from the gcc-2.95.X
releases. It will be primarily useful on machines where
sizeof(rtx) != sizeof(int).

I've been building kernels (linux-2.4.X) with these patches
applied for a while, and things work for me! (famous last words...)

My thanks to everyone working on GCC.

Index: gcc/haifa-sched.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/haifa-sched.c,v
retrieving revision 1.86.4.4
diff -u -r1.86.4.4 haifa-sched.c
--- haifa-sched.c	1999/10/12 05:38:53	1.86.4.4
+++ haifa-sched.c	2001/09/10 23:01:11
@@ -7159,7 +7159,7 @@
   bzero ((char *) bb_pending_read_mems, n_bbs * sizeof (rtx));
   bzero ((char *) bb_pending_write_insns, n_bbs * sizeof (rtx));
   bzero ((char *) bb_pending_write_mems, n_bbs * sizeof (rtx));
-  bzero ((char *) bb_pending_lists_length, n_bbs * sizeof (rtx));
+  bzero ((char *) bb_pending_lists_length, n_bbs * sizeof (int));
   bzero ((char *) bb_last_pending_memory_flush, n_bbs * sizeof (rtx));
   bzero ((char *) bb_last_function_call, n_bbs * sizeof (rtx));
   bzero ((char *) bb_sched_before_next_call, n_bbs * sizeof (rtx));
Index: gcc/combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.62.4.6
diff -u -r1.62.4.6 combine.c
--- combine.c	2001/04/03 13:13:58	1.62.4.6
+++ combine.c	2001/09/10 23:02:58
@@ -6109,8 +6109,8 @@
     case LSHIFTRT:
       /* If the sign bit is known to be zero, replace this with an
 	 arithmetic shift.  */
-      if (ashr_optab->handlers[(int) mode].insn_code == CODE_FOR_nothing
-	  && lshr_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing
+      if (ashr_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing
+	  && lshr_optab->handlers[(int) mode].insn_code == CODE_FOR_nothing
 	  && mode_width <= HOST_BITS_PER_WIDE_INT
 	  && (nonzero_bits (XEXP (x, 0), mode) & (1 << (mode_width - 1))) == 0)
 	{
-- 


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