ada/6483: ada fails to build under hppa*-hp-hpux*

John David Anglin dave@hiauly1.hia.nrc.ca
Tue Apr 30 11:16:00 GMT 2002


The following reply was made to PR ada/6483; it has been noted by GNATS.

From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
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  <zack@codesourcery.com>
 > > >
 > > >        * 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
 <http://gcc.gnu.org/ml/gcc-patches/2002-04/msg01625.html>.
 
 > 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)



More information about the Gcc-prs mailing list