This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp4] fix spinlock


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]