This is the mail archive of the gcc-patches@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: PATCH RFA: Split stack [4/7]: REF_CFA_TEMPORARY


Richard Henderson <rth@redhat.com> writes:

> On 09/22/2010 03:03 PM, Ian Lance Taylor wrote:
>> This is the fourth of the -fsplit-stack patches.  This patch adds a new
>> feature to the DWARF frame note.  If an insn has a new REG_CFA_TEMPORARY
>> note, then the CFA is set to the value of the note only for that insn.
>> The i386 backend uses this new feature to set the unwind information for
>> a special ret instruction that it uses to permit the processor to do
>> call/return prediction.
>
> Ok, scratch the previous sub-thread.  I've looked through 6/7 to
> see how you're actually using it.
>
> That said, I still don't like it the note.

Actually, I'm going to withdraw this part of the patch.  It was
necessary at one time to unwind the stack, but now the assembly code
uses slightly tricky unwind info to skip the single return instruction
entirely during the unwind process.  There are still some issues with
the unwind information in 32-bit mode, but they aren't helped by this
patch.  So please consider this patch withdrawn, with the corresponding
changes to patch 5 (x86 backend).


> I also wonder if it wouldn't be better to merge the call and return
> insns into the same pattern.  This would guarantee that nothing
> sneeks in, when we're playing games with ret_addr+1.

I'm a bit reluctant to do that now, since there seem to be several
different variants of the x86 call instruction.  It's certainly a
possibility for later.  There is very little opportunity for anything to
slip in, since the return instruction is unspec_volatile and is
immediately followed by the label which is the target of the branch of
there is enough stack space.

Ian


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