This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pa.md bugfix
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: pa.md bugfix
- From: Jeffrey A Law <law at redhat dot com>
- Date: Tue, 23 Jan 2001 09:55:09 -0700
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <200101230549.AAA11143@hiauly1.hia.nrc.ca>you write:
> This may not be correct. The ABI indicates that the PIC register must
> be correctly set when the function returns.
Right.
> This enables a correct return via a stub from a shared library.
Correct.
> If +O3 is used, rename registers may use the PIC register if we don't
> have a use in the return.
No, the PIC register is fixed. What we recently removed was the _copy_ of
the PIC register we had stuffed away in a fixed call-saved register.
Also remember that "return" is only used in a leaf function -- ie, no
calls and thus nothing clobbers %r19.
> > + ;; We use the PIC register to ensure it's restored after a
> > + ;; call in PIC mode. This can be non-optimal for non-PIC
> > + ;; code but the real world cost should be unmeasurable.
> > (define_insn "return_internal"
>
> Suggest two insns: pic_return_internal and return_internal. We only
> need the extra use in pic_return_internal.
Already considered it. It's not worth the time/effort.
FWIW, there *is* a minor bug in the patch. It breaks PA64 because of the
mode on the use of the PIC register. I'll fix that in a minute.
jeff