This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: [PATCH 1/3, MIPS] Rewrite MIPS' atomic.h to use __atomic_* builtins.


On 14/06/2012, at 4:26 PM, Maxim Kuvyrkov wrote:

> This patch rewrites MIPS' atomic.h to use __atomic_* builtins instead of inline assembly.  These builtins are available in recent version of GCC and correspond to C++11 memory model support, they also map very well to GLIBC's atomic_* macros.
> 
> With the GCC patches posted here [*] applied, the compiler will generate same, or better, assembly code for the atomic macros.  XLP processors in particular will see a significant boost as GCC will use XLP-specific SWAP and LDADD instructions for some of the macros instead of LL/SC sequences.
> 
> This patch was tested on XLP with no regressions; testing on a non-XLP platform is in progress.  Testing was done using GCC mainline with [*] patches applied.  OK to apply once 2.16 branches?
> 

[*] http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00779.html

--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics


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