summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-23 16:00:06 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-23 16:00:06 +0000
commite95ebfe01248c88832e21726accb01321f20a61e (patch)
treeef220d1f1710bdd39aaddf1da18b1709fc794695 /gcc/reorg.c
parent40be2320a3646ff02c2caa7459eaccdce2b5c2f4 (diff)
downloadgcc-e95ebfe01248c88832e21726accb01321f20a61e.tar.gz
2001-07-13 Andrew Haley <aph@redhat.com>
* doc/tm.texi (MD_CAN_REDIRECT_BRANCH): New macro. * config/sh/sh.h (MD_CAN_REDIRECT_BRANCH): New macro. * config/sh/sh.c (sh_can_redirect_branch): New function. * config/sh/sh-protos.h (sh_can_redirect_branch): Declare. * reorg.c (steal_delay_list_from_target): Use MD_CAN_REDIRECT_BRANCH to see if redirection is possible. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44269 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 1f26e7e3751..3177e7117dd 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -1272,6 +1272,14 @@ steal_delay_list_from_target (insn, condition, seq, delay_list,
|| ! single_set (XVECEXP (seq, 0, 0)))
return delay_list;
+#ifdef MD_CAN_REDIRECT_BRANCH
+ /* On some targets, branches with delay slots can have a limited
+ displacement. Give the back end a chance to tell us we can't do
+ this. */
+ if (! MD_CAN_REDIRECT_BRANCH (insn, XVECEXP (seq, 0, 0)))
+ return delay_list;
+#endif
+
for (i = 1; i < XVECLEN (seq, 0); i++)
{
rtx trial = XVECEXP (seq, 0, i);