This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4] fix spinlock
- From: Nathan Sidwell <nathan at acm dot org>
- To: Cesar Philippidis <cesar at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 6 Aug 2015 21:49:22 +0200
- Subject: Re: [gomp4] fix spinlock
- Authentication-results: sourceware.org; auth=none
- References: <55C31DAB dot 9040307 at acm dot org> <55C383B7 dot 50704 at codesourcery dot com>
On 08/06/15 17:56, Cesar Philippidis wrote:
On 08/06/2015 01:41 AM, Nathan Sidwell wrote:
I've committed this to fix the spinlock problem Cesar fell over. While
there I added more checking on the worker dimension.
I hit a couple of more bugs with the spinlocks. First, the address space
argument to membar wasn't being handled properly.
OK
Second,
nvptx_spinunlock should probably be using atom.exch instead of atom.cas.
I'm ambivalent about this. I chese cas precisely to dodge the issue of needing
a temp reg.
Finally, ptxas complains about the period prefix to the atom
instructions. This patch addresses these problems.
ok
Is there a better way to allocate a scratch register for
nvptx_spinunlock, or is my solution ok as-is for gomp-4_0-branch?
Allocation is ok. I guess really this should be a SET and we could even name it
correctly as an atomic exchange, but that's probably more than needed right no.
patch is ok,thanks