Re: [gomp-nvptx 3/5] nvptx backend: set up stacks in entry code

2016-02-22 Thread Alexander Monakov
On Mon, 22 Feb 2016, Nathan Sidwell wrote: > On 02/22/16 15:25, Alexander Monakov wrote: > > > Template strings have an embedded nul character at the position where ORIG > > goes, so template_2 is set to point at the position following the embedded > > nul > > in template_1. Offset of the

Re: [gomp-nvptx 3/5] nvptx backend: set up stacks in entry code

2016-02-22 Thread Nathan Sidwell
On 02/22/16 15:25, Alexander Monakov wrote: Template strings have an embedded nul character at the position where ORIG goes, so template_2 is set to point at the position following the embedded nul in template_1. Offset of the embedded nul is the same in each template string, so it doesn't

Re: [gomp-nvptx 3/5] nvptx backend: set up stacks in entry code

2016-02-22 Thread Alexander Monakov
On Mon, 22 Feb 2016, Nathan Sidwell wrote: > On 02/15/16 13:44, Alexander Monakov wrote: > > This patch implements the NVPTX backend part of the transition to > > > + static const char template64[] = ENTRY_TEMPLATE ("64", "8", > > "mad.wide.u32"); > > + static const char template32[] =

Re: [gomp-nvptx 3/5] nvptx backend: set up stacks in entry code

2016-02-22 Thread Nathan Sidwell
On 02/15/16 13:44, Alexander Monakov wrote: This patch implements the NVPTX backend part of the transition to + static const char template64[] = ENTRY_TEMPLATE ("64", "8", "mad.wide.u32"); + static const char template32[] = ENTRY_TEMPLATE ("32", "4", "mad.lo.u32 "); +#undef ENTRY_TEMPLATE

[gomp-nvptx 3/5] nvptx backend: set up stacks in entry code

2016-02-15 Thread Alexander Monakov
This patch implements the NVPTX backend part of the transition to host-allocated soft stacks. The compiler-emitted kernel entry code now accepts a pointer to stack storage and per-warp stack size, and initialized __nvptx_stacks based on that (as well as trivially initializing __nvptx_uni). The