QUery regarding target macros ELIMINABLE_REGS and CAN_ELIMINATE.

sumanth sumanth.gundapneni@redpinesignals.com
Thu Apr 23 05:40:00 GMT 2009


Hi
           I tried what you suggested and now my soft frame pointer gets 
eliminated with hard frame pointer.
  The problem here is I am not getting the correct debugging information 
generated by compiler for local variables.
  Eg: HARD_FRAME_POINTER_REGNUM is R11 FRAME_POINTER_REGNUM is RFP.
  Now , as you mentioned I replaced RFP with R11 , my debugging 
information gets corrupted.
  ""But if I hard code  my FRAME_POINTER_REGNUM  with R11 instead of 
RFP  , I get the correct debugging information""
  and I do have certain problems in build with above replacement and the 
generated code is not as reliable as expected.
 Any suggestions are welcome .

Thanks in advance,
Sumanth G 
Ian Lance Taylor wrote:
> sumanth <sumanth.gundapneni@redpinesignals.com> writes:
>
>   
>> Ian Lance Taylor wrote:
>>     
>>> sumanth <sumanth.gundapneni@redpinesignals.com> writes:
>>>
>>>   
>>>       
>>>>   But, my code generated is not according to CAN_ELIMINATE . It is not
>>>> replacing FRAME_POINTER_REGNUM  with HARD_FRAME_POINTER_REGNUM.
>>>>     
>>>>         
>>> Frame pointer elimination is based on FRAME_POINTER_REQUIRED.  You need
>>> to set both that and CAN_ELIMINATE to prevent frame pointer elimination.
>>>       
>> Currently I am using  #define FRAME_POINTER_REQUIRED
>> (current_function_calls_alloca)
>> How ever i tried with #define FRAME_POINTER_REQUIRED  0 too and my
>> result is same.
>> Any suggestions are  welcome
>>     
>
> If FRAME_POINTER_REQUIRED is 0, and ELIMINABLE_REGS is defined, and
> CAN_ELIMINATE (FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM) returns
> 0, then the register should not be eliminated.
>
> I may have gotten confused about what you want.  Do you want
> FRAME_POINTER_REGNUM replaced by HARD_FRAME_POINTER_REGNUM or not?  If
> you do want it replaced, then CAN_ELIMINATE must return 1 for that case.
> If you do not want it eliminated, then I think that both must be real
> registers.
>
> Ian
>
>
>   




More information about the Gcc-help mailing list