PIC code for coldfire v4e
Peter Barada
peter@the-baradas.com
Thu Sep 16 07:38:00 GMT 2004
>> 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.)
See:
http://gcc.gnu.org/ml/gcc/2002-12/msg00343.html
for the start of a thread where I tried to implement this back in
2002. Perhaps it will shortcut some of the issues you are about to
get run over by. Unfortunately I ran out of time before I was able to fully
implement/test it...
Andres, see:
http://gcc.gnu.org/ml/gcc/2002-12/msg00345.html
for my response to your same suggestion :)
--
Peter Barada
peter@the-baradas.com
More information about the Gcc
mailing list