This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: [PATCH] Add __builtin_ia32_stack_top
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Wed, 22 Jul 2015 06:59:08 -0700
- Subject: Re: RFC: [PATCH] Add __builtin_ia32_stack_top
- Authentication-results: sourceware.org; auth=none
- References: <20150721214539 dot GA19891 at intel dot com> <CAMe9rOpdnvRt=M_hDqBE_Oa8bpLRR0QsxTn1fz9OQMq4oaM3wQ at mail dot gmail dot com> <20150722135516 dot GF11682 at gate dot crashing dot org>
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.