This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-64 on HP-UX 11.00
- From: law at redhat dot com
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: h dot m dot brand at hccnet dot nl, gcc at gcc dot gnu dot org
- Date: Tue, 16 Apr 2002 14:18:29 -0600
- Subject: Re: gcc-64 on HP-UX 11.00
- Reply-to: law at redhat dot com
In message <200204152027.g3FKRLuZ009642@hiauly1.hia.nrc.ca>, "John David Anglin
" writes:
> > However, the code from the actual perl function looks like:
> >
> > cmpib,= 0,%r3,L$1012
> > addil LT'PL_sv_no,%r27
> > addil LT'PL_sv_yes,%r27
> > b L$1013
> > fldd RT'PL_sv_yes(%r1),%fr22
> > L$1012
> > fldd RT'PL_sv_no(%r1),%fr22
> > L$1013
> > fstd %fr22,-272(%r30)
> > b L$0783
> > ldd -272(%r30),%r25
> > [...]
> > L$1017
> > copy %r28,%r25
> > L$0783
> > copy %r25,%r28
> > [restore registers and return]
>
> I tested this with gcc 3.0.3 -O -mpa-risc-2-0 -fPIC (32bit) and the code is:
>
> cmpib,= 0,%r28,L$0940
> addil LT'PL_sv_yes,%r19
> b L$0733
> ldw RT'PL_sv_yes(%r1),%r28
> L$0940
> addil LT'PL_sv_no,%r19
> b L$0733
> ldw RT'PL_sv_no(%r1),%r28
>
> So, this worked with 3.0.3 and we have a regression.
I don't doubt that it worked in the past. My point is that selecting an
FP register to hold an address like this is an exceedingly bad thing to
do. In fact, not assigning the value to a register and instead leaving it
in memory is actually cheaper than assigning it to an FP register.
In fact, from the fragments, it looks like we did something insanely stupid,
why don't we assign the value to %r28 or %r25?
jeff