This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pa.md bugfix
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: pa.md bugfix
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Tue, 23 Jan 2001 00:49:06 -0500 (EST)
- Cc: law at redhat dot com
There is one issue and one potential optimisation that I can see with respect
to this patch.
> + ;; This can only be used in a leaf function, so we do
> + ;; not need to use the PIC register.
> (define_insn "return"
This may not be correct. The ABI indicates that the PIC register must
be correctly set when the function returns. This enables a correct return
via a stub from a shared library. If +O3 is used, rename registers may
use the PIC register if we don't have a use in the return. Remember,
the PIC register is not a fixed register any more.
> + ;; 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.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)