Re: [gomp-nvptx 6/9] nvptx libgcc: rewrite in C

2015-12-07 Thread Nathan Sidwell
On 12/01/15 18:52, Bernd Schmidt wrote: What exactly is the problem with having asm files? I'm asking because this... On 12/01/2015 04:28 PM, Alexander Monakov wrote: +/* __shared__ char *__nvptx_stacks[32]; */ +asm ("// BEGIN GLOBAL VAR DEF: __nvptx_stacks"); +asm (".visible .shared .u64 __nv

Re: [gomp-nvptx 6/9] nvptx libgcc: rewrite in C

2015-12-01 Thread Alexander Monakov
On Wed, 2 Dec 2015, Bernd Schmidt wrote: > What exactly is the problem with having asm files? I'm asking because this... Wrappers for malloc and free need different code under -muniform-simt. > > On 12/01/2015 04:28 PM, Alexander Monakov wrote: > > +/* __shared__ char *__nvptx_stacks[32]; */ >

Re: [gomp-nvptx 6/9] nvptx libgcc: rewrite in C

2015-12-01 Thread Bernd Schmidt
What exactly is the problem with having asm files? I'm asking because this... On 12/01/2015 04:28 PM, Alexander Monakov wrote: +/* __shared__ char *__nvptx_stacks[32]; */ +asm ("// BEGIN GLOBAL VAR DEF: __nvptx_stacks"); +asm (".visible .shared .u64 __nvptx_stacks[32];"); + +/* __shared__ unsi

[gomp-nvptx 6/9] nvptx libgcc: rewrite in C

2015-12-01 Thread Alexander Monakov
To easily build libgcc for -mgomp multilib, I've rewritten libgcc routines from asm to C. En passant, I've fixed a bug in malloc and realloc wrappers where they failed to handle out-of-memory conditions. I'm assuming it wasn't intentional. I also use a patch for Newlib that rewrites its nvptx-sp