public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [v850] fix branch limits
@ 2015-02-19 20:57 DJ Delorie
  0 siblings, 0 replies; only message in thread
From: DJ Delorie @ 2015-02-19 20:57 UTC (permalink / raw)
  To: gcc-patches


The branch limits are a bit too far, resulting in reloc errors in rare
cases.  Ok?

	* config/v850/v850.md (branch_normal): Adjust branch limits.
	(branch_invert): Likewise.
	(branch_z_normal): Likewise.
	(branch_z_invert): Likewise.
	(branch_nz_normal): Likewise.
	(branch_nz_invert): Likewise.
	(jump): Likewise.

Index: gcc/config/v850/v850.md
===================================================================
--- gcc/config/v850/v850.md	(revision 220821)
+++ gcc/config/v850/v850.md	(working copy)
@@ -1452,13 +1452,13 @@
   if (TARGET_V850E3V5_UP && get_attr_length (insn) == 4)
     return "b%b1 %l0";
   return "b%B1 .+6 ; jr %l0";
 }
  [(set (attr "length")
     (if_then_else (lt (abs (minus (match_dup 0) (pc)))
-		      (const_int 256))
+		      (const_int 254))
 		  (const_int 2)
 		  (if_then_else (lt (abs (minus (match_dup 0) (pc)))
 		      (const_int 65536))
 		      (const_int 4)
 		      (const_int 6))))
   (set_attr "cc" "none")])
@@ -1485,13 +1485,13 @@
     return "b%B1 %l0";
     
   return "b%b1 .+6 ; jr %l0";
 }
  [(set (attr "length")
     (if_then_else (lt (abs (minus (match_dup 0) (pc)))
-		      (const_int 256))
+		      (const_int 254))
 		  (const_int 2)
 		  (if_then_else (lt (abs (minus (match_dup 0) (pc)))
 		      (const_int 65536))
 		      (const_int 4)
 		      (const_int 6))))
   (set_attr "cc" "none")])
@@ -1510,13 +1510,13 @@
     return "bz %l0";
 
   return "bnz 1f ; jr %l0 ; 1:";
 }
  [(set (attr "length")
     (if_then_else (lt (abs (minus (match_dup 0) (pc)))
-		      (const_int 256))
+		      (const_int 254))
 		  (const_int 2)
 		  (if_then_else (lt (abs (minus (match_dup 0) (pc)))
 		      (const_int 65536))
 		      (const_int 4)
 		      (const_int 6))))
   (set_attr "cc" "none")])
@@ -1535,13 +1535,13 @@
     return "bnz %l0";
 
   return "bz 1f ; jr %l0 ; 1:";
 }
  [(set (attr "length")
     (if_then_else (lt (abs (minus (match_dup 0) (pc)))
-			   (const_int 256))
+			   (const_int 254))
 		  (const_int 2)
 		  (if_then_else (lt (abs (minus (match_dup 0) (pc)))
 		      (const_int 65536))
 		      (const_int 4)
 		      (const_int 6))))
   (set_attr "cc" "none")])
@@ -1560,13 +1560,13 @@
     return "bnz %l0";
 
   return "bz 1f ; jr %l0 ; 1:";
 }
 [(set (attr "length")
     (if_then_else (lt (abs (minus (match_dup 0) (pc)))
-			   (const_int 256))
+			   (const_int 254))
 		  (const_int 2)
 		  (if_then_else (lt (abs (minus (match_dup 0) (pc)))
 		      (const_int 65536))
 		      (const_int 4)
 		      (const_int 6))))
   (set_attr "cc" "none")])
@@ -1585,13 +1585,13 @@
     return "bz %l0";
 
   return "bnz 1f ; jr %l0 ; 1:";
 }
  [(set (attr "length")
     (if_then_else (lt (abs (minus (match_dup 0) (pc)))
-		      (const_int 256))
+		      (const_int 254))
 		  (const_int 2)
 		  (if_then_else (lt (abs (minus (match_dup 0) (pc)))
 		      (const_int 65536))
 		      (const_int 4)
 		      (const_int 6))))
   (set_attr "cc" "none")])
@@ -1607,13 +1607,13 @@
     return "br %0";
   else
     return "jr %0";
 }
  [(set (attr "length")
     (if_then_else (lt (abs (minus (match_dup 0) (pc)))
-		      (const_int 256))
+		      (const_int 254))
 		  (const_int 2)
 		  (const_int 4)))
   (set_attr "cc" "none")])
 
 (define_insn "indirect_jump"
   [(set (pc) (match_operand:SI 0 "register_operand" "r"))]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-19 20:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19 20:57 [v850] fix branch limits DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).