From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 970 invoked by alias); 1 Nov 2002 23:07:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 893 invoked from network); 1 Nov 2002 23:06:59 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 1 Nov 2002 23:06:59 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gA1Mijw09903; Fri, 1 Nov 2002 17:44:45 -0500 Received: from porcupine.cygnus.com (vpn50-35.rdu.redhat.com [172.16.50.35]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gA1N6kf10545; Fri, 1 Nov 2002 18:06:46 -0500 Received: from porcupine (law@localhost) by porcupine.cygnus.com (8.12.5/8.12.5/Submit) with ESMTP id gA1NHLYs031703; Fri, 1 Nov 2002 16:17:23 -0700 Message-Id: <200211012317.gA1NHLYs031703@porcupine.cygnus.com> To: tm cc: kkojima@gcc.gnu.org, gcc-patches@gcc.gnu.org Reply-To: law@redhat.com Subject: Re: PATCH: reorg branch displacement fix In-Reply-To: Your message of "Fri, 01 Nov 2002 14:48:38 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 01 Nov 2002 15:07:00 -0000 From: Jeff Law X-SW-Source: 2002-11/txt/msg00049.txt.bz2 In message , tm writes: >On Fri, 1 Nov 2002, Jeff Law wrote: > >> In message , tm writ >es: >> > >> >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 >> > >> > * 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 displaceme >nts. >> That is a problem for shorten-branches and the backend. >> > >Okay, here's a revised patch: > >2002-10-31 Toshiyasu Morita > > * reorg.c (relax_delay_slots): Don't thread conditional branches. No. Wrong again. The fundamental problem is the SH is abusing the various pases. reorg is allowed (and has been designed) to ignore branch lengths. If it has a branch, it is allowed to thread the branch. jeff