[BZ,50356] Obvious bugfix in h8300 bits

Submitted by Jeff Law on Oct. 4, 2012, 8:58 p.m.

Details

Message ID 506DF872.8010101@redhat.com
State New
Headers show

Commit Message

Jeff Law Oct. 4, 2012, 8:58 p.m.
This is a pretty obvious typo/thinko.  Interestingly enough, fixing it 
makes absolutely no difference in the generated code for newlib ;-)  One 
could make an argument it should just be zapped, but I'm not going to 
open that can of worms today.

Obviously I tested this by building newlib before and after this change :-)
* PR target/50356
	* config/h8300/h8300.c (h8300_rtx_costs): Fix typo in CONST_INT case.

Patch hide | download patch | download mbox

Index: config/h8300/h8300.c
===================================================================
--- config/h8300/h8300.c	(revision 192102)
+++ config/h8300/h8300.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* Subroutines for insn-output.c for Renesas H8/300.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
    Contributed by Steve Chamberlain (sac@cygnus.com),
    Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
@@ -1244,7 +1244,7 @@ 
 	    *total = 0;
 	    return true;
 	  }
-	if (-4 <= n || n <= 4)
+	if (-4 <= n && n <= 4)
 	  {
 	    switch ((int) n)
 	      {