This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PIC code for coldfire v4e
"C Jaiprakash, Noida" <C.Jaiprakash@noida.hcltech.com> writes:
> Hi,
> I am trying to provide PIC support for coldfire v4e. Curently movsi pattern generates PIC code , basically it generates a RTX like PLUS(a5, symbolic_operand) where a5 is PIC offset table pointer. And at the final assembly o/p @GOT is appended to the symbol if base register is a5. For coldfire v4e this can not be done because only 16 bit offset is allowed. May be something like
> lea running@GOT.w, %register
> move.l (%a5,%register), %a0
> instead of
> move.l running@GOT.w(%a5),%a0
^^
This is already a 16 bit offset. For -fpic (as opposed to -fPIC) you
don't have to change anything here. You could just declare -fPIC
unsupported for this coldfire model (like it is done for m680[01]0.)
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."