This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PIC code for coldfire v4e


>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]