From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1346 invoked by alias); 30 Apr 2002 18:16:09 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 1318 invoked by uid 71); 30 Apr 2002 18:16:05 -0000 Date: Tue, 30 Apr 2002 11:16:00 -0000 Message-ID: <20020430181605.1313.qmail@sources.redhat.com> To: danglin@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "John David Anglin" Subject: Re: ada/6483: ada fails to build under hppa*-hp-hpux* Reply-To: "John David Anglin" X-SW-Source: 2002-04/txt/msg01644.txt.bz2 List-Id: The following reply was made to PR ada/6483; it has been noted by GNATS. From: "John David Anglin" To: zack@codesourcery.com Cc: mark@codesourcery.com, fw@deneb.enyo.de, dave.anglin@nrc.ca, gcc-gnats@gcc.gnu.org Subject: Re: ada/6483: ada fails to build under hppa*-hp-hpux* Date: Tue, 30 Apr 2002 14:13:59 -0400 (EDT) > On Tue, Apr 30, 2002 at 10:14:34AM -0700, Mark Mitchell wrote: > > > > >2001-10-08 Zack Weinberg > > > > > > * aclocal.m4 (gcc_AC_PROG_GNAT): New. > > > * configure.in: Use it. > > > * configure: Regenerated. > > > * config/pa/t-linux, config/pa/t-pa, config/pa/t-pa64, > > > config/pa/t-pro: Set T_ADAFLAGS, not ADA_CFLAGS. > > > > Zack, can you comment on this? > > I do not fully understand the issue here. > > My *impression* is that this is a host problem, i.e. that switch Yes. > should appear in an x-fragment not a t-fragment. My impression is Yes. > also that -mdisable-indexing needs to get applied to everything > compiled into gnat1, not just Ada source code. As far as I understand the situation, it only needs to be applied to the c and ada files in the ada subdirectory. We don't need to build all of gcc with -mdisable-indexing. > > Therefore, I'd suggest that the right fix is to nuke T_ADAFLAGS and > just set -mdisable-indexing with X_CFLAGS in x-pa. (There isn't an > x-pa right now, but we could create one.) I would prefer using something like X_ADA_CFLAGS so that the option only is applied building files in the ada subdirectory. > > I can provide a patch if you'd like. This is what I suggested . > p.s. The description of the effect of -mdisable-indexing, given by > various people on the list, does *not* match what it actually does. > What it actually does is prevent GCC from generating [reg+reg] loads. > (Well, that and this lovely piece of gobbledygook: > > /* Since move_operand is only used for source operands, we can always > allow scaled indexing! */ > if (! TARGET_DISABLE_INDEXING > && GET_CODE (op) == PLUS > && ((GET_CODE (XEXP (op, 0)) == MULT > && GET_CODE (XEXP (XEXP (op, 0), 0)) == REG > && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT > && INTVAL (XEXP (XEXP (op, 0), 1)) > == (HOST_WIDE_INT) GET_MODE_SIZE (mode) > && GET_CODE (XEXP (op, 1)) == REG) > || (GET_CODE (XEXP (op, 1)) == MULT > &&GET_CODE (XEXP (XEXP (op, 1), 0)) == REG > && GET_CODE (XEXP (XEXP (op, 1), 1)) == CONST_INT > && INTVAL (XEXP (XEXP (op, 1), 1)) > == (HOST_WIDE_INT) GET_MODE_SIZE (mode) > && GET_CODE (XEXP (op, 0)) == REG))) > return 1; > > but I think that boils down to the same thing.) > > I would think that if [reg+reg] loads are causing problems, there's a > bug in the machine description, and -mdisable-indexing is merely > papering it over. This has been discussed. What it boils down to is ada's use of virtual arrays don't play well with the segmented memory runtime used under hpux. Essentially, the gnat implementation assumes that these arrays can be accessed using a base register which can be anywhere in the virtual address space. Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605)