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] Add __builtin_stack_top to x86 backend


On Thu, Jul 30, 2015 at 8:41 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> On Tue, Jul 21, 2015 at 02:45:39PM -0700, H.J. Lu wrote:
>> When __builtin_frame_address is used to retrieve the address of the
>> function stack frame, the frame pointer is always kept, which wastes one
>> register and 2 instructions.  For x86-32, one less register means
>> significant negative impact on performance.  This patch adds a new
>> builtin function, __builtin_ia32_stack_top, to x86 backend.  It
>> returns the stack address when the function is called.
>>
>> Any comments, feedbacks?
>>
>
> Although this function is generic, but implementation is target
> specific.  I submitted a generic patch:
>
> https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01859.html
>
> So far there are no interests from other backends.  Here is a patch
> to implement __builtin_stack_top in x86 backend.  We can update x86
> backedn after it is added to middle-end.  OK for trunk?

I think that the discussion about generic implementation should come
to some conclusion first. From the discussion, here was no resolution
on which way to go.

Uros.


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