Re: [PATCH v2] aarch64: Add split-stack initial support

2017-02-01 Thread Wilco Dijkstra
Hi Adhermerval, The argument code looks good now, but this isn't right: +  int ninsn = aarch64_internal_mov_immediate (reg10, GEN_INT (-allocate), + true, Pmode); +  gcc_assert (ninsn == 1 || ninsn == 2); +  if (ninsn == 1) +    { +  if (allocate >

Re: [PATCH v2] aarch64: Add split-stack initial support

2017-01-31 Thread Adhemerval Zanella
On 25/01/2017 10:10, Jiong Wang wrote: > On 24/01/17 18:05, Adhemerval Zanella wrote: >> >> On 03/01/2017 13:13, Wilco Dijkstra wrote: >> >>> + /* If function uses stacked arguments save the old stack value so >>> morestack >>> + can return it. */ >>> + reg11 = gen_rtx_REG (Pmode,

Re: [PATCH v2] aarch64: Add split-stack initial support

2017-01-25 Thread Jiong Wang
On 24/01/17 18:05, Adhemerval Zanella wrote: On 03/01/2017 13:13, Wilco Dijkstra wrote: + /* If function uses stacked arguments save the old stack value so morestack + can return it. */ + reg11 = gen_rtx_REG (Pmode, R11_REGNUM); + if (cfun->machine->frame.saved_regs_size + ||

Re: [PATCH v2] aarch64: Add split-stack initial support

2017-01-24 Thread Adhemerval Zanella
On 03/01/2017 13:13, Wilco Dijkstra wrote: > Adhemerval Zanella wrote: > > Sorry for the late reply - but I think it's getting there. A few more > comments: No worries. > > + /* If function uses stacked arguments save the old stack value so morestack > + can return it. */ > + reg11

Re: [PATCH v2] aarch64: Add split-stack initial support

2017-01-03 Thread Wilco Dijkstra
Adhemerval Zanella wrote:   Sorry for the late reply - but I think it's getting there. A few more comments: + /* If function uses stacked arguments save the old stack value so morestack + can return it. */ + reg11 = gen_rtx_REG (Pmode, R11_REGNUM); + if

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-11-25 Thread Adhemerval Zanella
On 15/11/2016 16:38, Wilco Dijkstra wrote: > > On 07/11/2016 16:59, Adhemerval Zanella wrote: >> On 14/10/2016 15:59, Wilco Dijkstra wrote: > >> There is no limit afaik on gold split stack allocation handling, >> and I think one could be added for each backend (in the method >> override

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-11-15 Thread Wilco Dijkstra
On 07/11/2016 16:59, Adhemerval Zanella wrote: > On 14/10/2016 15:59, Wilco Dijkstra wrote: > There is no limit afaik on gold split stack allocation handling, > and I think one could be added for each backend (in the method > override require to implement it). > > In fact it is not really

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-11-14 Thread Adhemerval Zanella
Ping. On 07/11/2016 16:59, Adhemerval Zanella wrote: > > > On 14/10/2016 15:59, Wilco Dijkstra wrote: >> Hi, >> > > Thanks for the thoughtful review and sorry for late response. > >>> Split-stack prologue on function entry is as follow (this goes before the >>> usual function prologue): >>

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-11-07 Thread Adhemerval Zanella
On 14/10/2016 15:59, Wilco Dijkstra wrote: > Hi, > Thanks for the thoughtful review and sorry for late response. >> Split-stack prologue on function entry is as follow (this goes before the >> usual function prologue): > >> mrsx9, tpidr_el0 >> movx10, - > > As Jiong

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-10-14 Thread Wilco Dijkstra
Hi, > Split-stack prologue on function entry is as follow (this goes before the > usual function prologue): > mrsx9, tpidr_el0 > movx10, - As Jiong already remarked, the nop won't work. Do we know the maximum adjustment that the linker is allowed to make? If so, and we can

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-10-14 Thread Jiong Wang
Hi Adhemerval, On 06/10/16 22:54, Adhemerval Zanella wrote: + bool split_stack_arg_pointer_used = split_stack_arg_pointer_used_p (); if (flag_stack_usage_info) current_function_static_stack_size = frame_size; @@ -3220,6 +3264,10 @@ aarch64_expand_prologue (void)

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-10-12 Thread Kyrill Tkachov
On 11/10/16 20:39, Adhemerval Zanella wrote: diff --git a/gcc/testsuite/gcc.dg/split-3.c b/gcc/testsuite/gcc.dg/split-3.c index 64bbb8c..5ba7616 100644 --- a/gcc/testsuite/gcc.dg/split-3.c +++ b/gcc/testsuite/gcc.dg/split-3.c @@ -40,6 +40,7 @@ down (int i, ...) || va_arg (ap,

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-10-11 Thread Adhemerval Zanella
On 07/10/2016 05:28, Kyrill Tkachov wrote: > Hi Adhemerval, > > CC'ing the aarch64 maintainers/reviewers. > I have some comments inline, mostly about the GCC coding conventions. Thanks for the review. >> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c >> index

[PATCH v2] aarch64: Add split-stack initial support

2016-10-06 Thread Adhemerval Zanella
From: Adhemerval Zanella Changes from previous version: - Rewrite how to setup variadic argument: instead of using the hard_fp_offset value to setup the x10, save a fp value before stack allocation instead. This allows linker/gold to not require scan