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: [PATCH 2/7]: Ping3: Merge from Stack Branch - collect alignment info

On Wed, May 28, 2008 at 8:02 AM, H.J. Lu <> wrote:
>> In any case, this looks wrong.  This code appears to assume that the
>> only register elimination which happens is eliminating the frame
>> pointer to the stack pointer.  The ELIMINABLE_REGS concept is a
>> general one.  For example, look at how the rs6000 backend handles
>> RS6000_PIC_OFFSET_TABLE_REGNUM, or the s390 backend handles
>> If you want to check that we always eliminate the frame pointer to the
>> stack pointer, then that is what you need to check.  You can't check
>> that we eliminate every element in reg_eliminate.
> That is a good point. Different targets may have different requirements
> for stack alignment. We can something like
> #endif
> Each backend can define NOT_ELIMINABLE_ASSERT to check which registers
> have to be eliminated.

Hi Ian,

I am checking this patch into stack branch. For x86, we must allow
register elimination for both frame and argument pointers because
x86 stack realignment requires it.


2008-05-28  H.J. Lu  <>

        * reload1.c (SET_NOT_ELIMINABLE): New.
        (set_not_eliminable): Remove gcc_assert.
        (set_label_offsets): Use SET_NOT_ELIMINABLE instead of
        (elimination_effects): Likewise.
        (eliminate_regs_in_insn): Likewise.

        * config/i386/i386.h (SET_NOT_ELIMINABLE): New.

        * doc/tm.texi (SET_NOT_ELIMINABLE): New.

Attachment: n.txt
Description: Text document

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