aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2017-08-31 16:35:47 +0200
committerClaudiu Zissulescu <claziss@gcc.gnu.org>2017-08-31 16:35:47 +0200
commit28f4ff35247bb085d5de9816c6ced4dc4e14269e (patch)
tree17f923893dcbf0dcfacfafd2474ead8689c6ef24 /gcc
parent9f532472da3e506db3609ebb03cff3d5f20f7353 (diff)
downloadgcc-28f4ff35247bb085d5de9816c6ced4dc4e14269e.zip
gcc-28f4ff35247bb085d5de9816c6ced4dc4e14269e.tar.gz
gcc-28f4ff35247bb085d5de9816c6ced4dc4e14269e.tar.bz2
[ARC] Update can_follow_jump hook helper.
Short branches cannot be used to jump between hot/cold sections. Update the hook. gcc/ 2017-04-26 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.c (arc_can_follow_jump): Check for short branches. From-SVN: r251566
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arc/arc.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c0e032b..cf1e005 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2017-08-31 Claudiu Zissulescu <claziss@synopsys.com>
+ * config/arc/arc.c (arc_can_follow_jump): Check for short
+ branches.
+
+2017-08-31 Claudiu Zissulescu <claziss@synopsys.com>
+
* config.gcc: Use g.opt for arc.
* config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
functionality moved to ...
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 4dcac18..bc73a59 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -9845,6 +9845,9 @@ arc_can_follow_jump (const rtx_insn *follower, const rtx_insn *followee)
if (CROSSING_JUMP_P (followee))
switch (get_attr_type (u.r))
{
+ case TYPE_BRANCH:
+ if (get_attr_length (u.r) != 2)
+ break;
case TYPE_BRCC:
case TYPE_BRCC_NO_DELAY_SLOT:
return false;