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: Stack offset computation for incoming arguments.


Dear Eric,

Really Appreciate your reply here and made the following changes like

#define  ARG_POINTER_REGNUM 8           //Fake hard reg
#define FRAME _POINTER_REGNUM 9      // Fake hard reg
#define SP_REG  10

#define ELIMINABLE_REGS { {ARG_POINTER_REGNUM,STACK_POINTER_REGNUM},    \
                          {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM},   \
                          {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} }


 The ARG and FRAME  reg are not marked as fixed regs ,but marked as
call used regs respectively.


The  reload pass is eliminating the arg and fp regs to sp  ,when the
sample is  run with -fomit-frame-pointer  option, i.e

$t-gcc -S -fomit-frame-pointer  sample.c

But without the âfomit-frame-pointer  option the arg and fp is not
replaced with sp.

Please help us regrading with   any hints ??

Thank you
~Umesh

On Fri, May 30, 2014 at 4:24 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> ARG_POINTER_REGNUM and FRAME_POINTER_REGNUM need to be pseudo-registers if
>> they do not represent real registers.
>
> The wording "pseudo registers" is obviously a bit confusing in this context...
>
> If ARG_POINTER_REGNUM and FRAME_POINTER_REGNUM do not represent real registers
> then they need to be fake hard registers, i.e. hard registers according to the
> FIRST_PSEUDO_REGISTER macro but with an arbitrary REGNUM (typically just below
> the FIRST_PSEUDO_REGISTER macro).  See the numerous examples in the tree.
>
> --
> Eric Botcazou


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