On Wed, Aug 19, 2015 at 03:18:46PM -0700, H.J. Lu wrote:
> @deftypefn {Built-in Function} {void *} __builtin_argument_pointer (void)
> This function is similar to @code{__builtin_frame_address} with an
> argument of 0, but it returns the address of the incoming arguments to
> the current function r
On Wed, Aug 19, 2015 at 3:10 PM, Segher Boessenkool
wrote:
> On Wed, Aug 19, 2015 at 02:53:47PM -0700, H.J. Lu wrote:
>> How about this
>>
>> @deftypefn {Built-in Function} {void *} __builtin_argument_pointer (void)
>> This function is similar to @code{__builtin_frame_address} with an
>> argument
On Wed, Aug 19, 2015 at 02:53:47PM -0700, H.J. Lu wrote:
> How about this
>
> @deftypefn {Built-in Function} {void *} __builtin_argument_pointer (void)
> This function is similar to @code{__builtin_frame_address} with an
> argument of 0, but it returns the address of the incoming arguments to
> th
On Wed, Aug 19, 2015 at 10:53 AM, H.J. Lu wrote:
> On Wed, Aug 19, 2015 at 10:48 AM, Segher Boessenkool
> wrote:
>> On Wed, Aug 19, 2015 at 10:08:01AM -0700, H.J. Lu wrote:
>>> > Maybe something like (heavily cut'n'pasted):
>>> >
>>> >
>>> > @deftypefn {Built-in Function} {void *} __builtin_argum
On Wed, Aug 19, 2015 at 10:48 AM, Segher Boessenkool
wrote:
> On Wed, Aug 19, 2015 at 10:08:01AM -0700, H.J. Lu wrote:
>> > Maybe something like (heavily cut'n'pasted):
>> >
>> >
>> > @deftypefn {Built-in Function} {void *} __builtin_argument_address (void)
>> > This function is similar to @code{_
On Wed, Aug 19, 2015 at 10:08:01AM -0700, H.J. Lu wrote:
> > Maybe something like (heavily cut'n'pasted):
> >
> >
> > @deftypefn {Built-in Function} {void *} __builtin_argument_address (void)
> > This function is similar to @code{__builtin_frame_address} with an
> > argument of 0, but it returns th
On Wed, Aug 19, 2015 at 9:58 AM, Segher Boessenkool
wrote:
> On Wed, Aug 19, 2015 at 08:25:49AM -0700, H.J. Lu wrote:
>> Here is a patch to add __builtin_argument_pointer. I only have
>
> Sorry to be a pain but... all the other builtins use _address
> instead of _pointer, it's probably best to f
On Wed, Aug 19, 2015 at 08:25:49AM -0700, H.J. Lu wrote:
> Here is a patch to add __builtin_argument_pointer. I only have
Sorry to be a pain but... all the other builtins use _address
instead of _pointer, it's probably best to follow that.
> -- Built-in Function: void * __builtin_argument_poin
On Wed, Aug 19, 2015 at 6:00 AM, H.J. Lu wrote:
> On Wed, Aug 19, 2015 at 5:51 AM, Segher Boessenkool
> wrote:
>> On Wed, Aug 19, 2015 at 05:23:41AM -0700, H.J. Lu wrote:
>>> >>> >> > You might have a reason why you want the entry stack address
>>> >>> >> > instead of the
>>> >>> >> > frame addr
On Wed, Aug 19, 2015 at 5:51 AM, Segher Boessenkool
wrote:
> On Wed, Aug 19, 2015 at 05:23:41AM -0700, H.J. Lu wrote:
>> >>> >> > You might have a reason why you want the entry stack address
>> >>> >> > instead of the
>> >>> >> > frame address, but you didn't really explain I think? Or I missed
On Wed, Aug 19, 2015 at 05:23:41AM -0700, H.J. Lu wrote:
> >>> >> > You might have a reason why you want the entry stack address instead
> >>> >> > of the
> >>> >> > frame address, but you didn't really explain I think? Or I missed
> >>> >> > it.
> >>
> >> What would a C program do with this, th
On Tue, Aug 4, 2015 at 1:50 PM, H.J. Lu wrote:
> On Tue, Aug 4, 2015 at 1:45 PM, Segher Boessenkool
> wrote:
>> On Tue, Aug 04, 2015 at 01:00:32PM -0700, H.J. Lu wrote:
>>> There is another issue with x86, maybe other targets. You
>>> can't get the real stack top when stack is realigned and
>>>
On Tue, Aug 4, 2015 at 1:45 PM, Segher Boessenkool
wrote:
> On Tue, Aug 04, 2015 at 01:00:32PM -0700, H.J. Lu wrote:
>> There is another issue with x86, maybe other targets. You
>> can't get the real stack top when stack is realigned and
>> -maccumulate-outgoing-args isn't used since ix86_expand_
On Tue, Aug 04, 2015 at 01:00:32PM -0700, H.J. Lu wrote:
> There is another issue with x86, maybe other targets. You
> can't get the real stack top when stack is realigned and
> -maccumulate-outgoing-args isn't used since ix86_expand_prologue
> will create and return another stack frame for
> __bu
On Tue, Aug 4, 2015 at 12:29 PM, Segher Boessenkool
wrote:
> On Tue, Aug 04, 2015 at 11:50:00AM -0700, H.J. Lu wrote:
>> >> The motivation of __builtin_stack_top is that frame_address requires a
>> >> frame pointer register, which isn't desirable for x86.
>> >> __builtin_stack_top
>> >> doesn't
On Tue, Aug 04, 2015 at 11:50:00AM -0700, H.J. Lu wrote:
> >> The motivation of __builtin_stack_top is that frame_address requires a
> >> frame pointer register, which isn't desirable for x86. __builtin_stack_top
> >> doesn't require a frame pointer register.
> >
> > If the target just returns fra
On Tue, Aug 4, 2015 at 11:50 AM, H.J. Lu wrote:
> On Tue, Aug 4, 2015 at 10:43 AM, Segher Boessenkool
> wrote:
>> On Tue, Aug 04, 2015 at 10:28:00AM -0700, H.J. Lu wrote:
>>> >> Any comments on my middle-end patch?
>>> >
>>> > So, if the answer is the same as frame_address (0), why not have the
On Tue, Aug 4, 2015 at 10:43 AM, Segher Boessenkool
wrote:
> On Tue, Aug 04, 2015 at 10:28:00AM -0700, H.J. Lu wrote:
>> >> Any comments on my middle-end patch?
>> >
>> > So, if the answer is the same as frame_address (0), why not have the
>> > fallback just expand to that? Then, one can use thi
On Tue, Aug 04, 2015 at 10:28:00AM -0700, H.J. Lu wrote:
> >> Any comments on my middle-end patch?
> >
> > So, if the answer is the same as frame_address (0), why not have the
> > fallback just expand to that? Then, one can use this builtin everywhere
> > that frame address is used today. Peopl
On Tue, Aug 4, 2015 at 10:16 AM, Mike Stump wrote:
> On Aug 4, 2015, at 8:44 AM, H.J. Lu wrote:
>> On Tue, Aug 4, 2015 at 8:40 AM, Mike Stump wrote:
>>> On Aug 4, 2015, at 5:30 AM, H.J. Lu wrote:
Where does this feature belong?
>>>
>>> I prefer the middle end.
>>
>> Any comments on my midd
On Aug 4, 2015, at 8:44 AM, H.J. Lu wrote:
> On Tue, Aug 4, 2015 at 8:40 AM, Mike Stump wrote:
>> On Aug 4, 2015, at 5:30 AM, H.J. Lu wrote:
>>> Where does this feature belong?
>>
>> I prefer the middle end.
>
> Any comments on my middle-end patch?
So, if the answer is the same as frame_addre
On Tue, Aug 4, 2015 at 8:40 AM, Mike Stump wrote:
> On Aug 4, 2015, at 5:30 AM, H.J. Lu wrote:
>> Where does this feature belong?
>
> I prefer the middle end.
Any comments on my middle-end patch?
Thanks.
--
H.J.
On Aug 4, 2015, at 5:30 AM, H.J. Lu wrote:
> Where does this feature belong?
I prefer the middle end.
: Document __builtin_stack_top.
> * doc/tm.texi.in (TARGET_STACK_TOP_RTX): New.
> * doc/tm.texi: Regenerated.
>
> gcc/testsuite/
>
> PR target/66960
> * gcc.target/i386/pr66960-1.c: New test.
> * gcc.target/i386/pr66960-2.c: Likewise.
> * gcc.target/i386/pr66960-3.c: Likew
On Thu, Jul 30, 2015 at 8:41 PM, H.J. Lu 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,
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
26 matches
Mail list logo