This is the mail archive of the 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.)


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:
for my response to your same suggestion :)

Peter Barada

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