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: RFC: [PATCH] Add __builtin_ia32_stack_top


On Wed, Jul 22, 2015 at 6:55 AM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> On Wed, Jul 22, 2015 at 05:10:04AM -0700, H.J. Lu wrote:
>> I got a feedback, suggesting __builtin_stack_top, instead of
>> __builtin_ia32_stack_top.  But I don't know if
>>
>> +      /* After the prologue, stack top is at -WORD(AP) in the current
>> +        frame.  */
>> +      emit_insn (gen_rtx_SET (target,
>> +                             plus_constant (Pmode, arg_pointer_rtx,
>> +                                            -UNITS_PER_WORD)));
>>
>> is true for all backends.  If it works on all backends, I can move
>> it to builtins.c.
>
> It doesn't afaik.  But can't you define INITIAL_FRAME_ADDRESS_RTX?
>
>
> Segher

Does INITIAL_FRAME_ADDRESS_RTX point to stack top? It certainly
can't be defined for x86.   I will write a midld-end patch and leave to each
backend to enable it.

-- 
H.J.


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