[v850] fix branch limits
DJ Delorie
dj@redhat.com
Thu Feb 19 20:57:00 GMT 2015
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"))]
More information about the Gcc-patches
mailing list