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: [libitm] Add SPARC bits


From: Eric Botcazou <ebotcazou@adacore.com>
Date: Mon, 27 Feb 2012 10:42:17 +0100

>> We probably want to do some nop'ish thing here which will yield the
>> cpu thread on Niagara cpus, I'd recommend something along the lines of
>> "rd %ccr, %g0" or "rd %y, %g0"
> 
> libgomp has its own idea about cpu_relax:
> 
> static inline void
> cpu_relax (void)
> {
> #if defined __arch64__ || defined  __sparc_v9__
>   __asm volatile ("membar #LoadLoad" : : : "memory");
> #else
>   __asm volatile ("" : : : "memory");
> #endif
> }
> 
> Maybe we can come up with a single implementation for libgomp and libitm?

I think that's a great idea.

We need a reliable way to test for v9/v8plus/whatever properly because
nobody is testing current gcc with real 32-bit pre-v9 sparc hardware and
not providing atomics and proper cpu_relax implementations is just silly.


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