public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: tm <tm@mail.kloo.net>
To: law@redhat.com
Cc: kkojima@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: PATCH: reorg branch displacement fix
Date: Fri, 01 Nov 2002 11:35:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.21.0211011127060.4789-100000@mail.kloo.net> (raw)
In-Reply-To: <200211011445.gA1Ej8sA030186@porcupine.cygnus.com>

On Fri, 1 Nov 2002, Jeff Law wrote:

> In message <Pine.LNX.4.21.0210311508160.3016-100000@mail.kloo.net>, tm writes:
>  >
>  >This fixes the problem mentioned in:
>  >
>  >http://gcc.gnu.org/ml/gcc-bugs/2002-06/msg00896.html
>  >
>  >When a conditional branch jumps to an unconditional branch, reorg will
>  >thread the branch without checking if the conditional branch has enough
>  >displacement bits to branch to the target.
>  >
>  >This patch uses MD_CAN_REDIRECT_BRANCH (as suggested by Joern in followup
>  >messages to original message) to implement the substitution checking.
>  >
>  >Please review and if correct, commit as I don't have CVS access.
>  >
>  >Toshi
>  >
>  >Thu Oct 31  Toshiyasu Morita  <toshiyasu.morita@hsa.hitachi.com>
>  >
>  >	* reorg.c (relax_delay_slots): Don't thread conditional jump
>  >        through unconditional jump if the conditional jump can't reach
>  >        the branch target on this processor target.
> This is wrong.  reorg does not and should not be checking branch displacements.
> That is a problem for shorten-branches and the backend.
> 
> jeff

Aha! I see now. I will try disabling that chunk of code, and testing.

Incidentially, MD_CAN_REDIRECT_BRANCH is already used in reorg in one
other place, in steal_delay_list_from_target():

#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

This should probably be fixed as well.

Toshi


  reply	other threads:[~2002-11-01 19:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-31 15:25 tm
2002-11-01  6:34 ` Jeff Law
2002-11-01 11:35   ` tm [this message]
2002-11-03 12:34     ` Jeff Law
2002-11-01 14:55   ` tm
2002-11-01 15:07     ` Jeff Law
2002-11-01 14:13 Joern Rennecke
2002-11-01 14:49 ` Jeff Law
2002-11-01 14:52   ` tm
2002-11-01 15:21   ` Joern Rennecke
2002-11-01 15:37     ` Jeff Law
2002-11-01 14:51 ` tm
2002-11-01 15:05   ` Jeff Law
2002-11-04 15:16     ` Joern Rennecke
2002-11-04 17:40       ` Hans-Peter Nilsson
2002-11-05 11:45 ` tm
2002-11-06 12:18   ` Joern Rennecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.21.0211011127060.4789-100000@mail.kloo.net \
    --to=tm@mail.kloo.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kkojima@gcc.gnu.org \
    --cc=law@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).