This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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 2/2] sparc: Use atomic compiler builtins on sparc



On 19/11/2019 11:23, Andreas Larsson wrote:
> On 2019-11-13 20:28, Adhemerval Zanella wrote:
>> This patch removes the arch-specific atomic instruction, relying on
>> compiler builtins.  The __sparc32_atomic_locks support is removed
>> and a configure check is added to check if compiler uses libatomic
>> to implement CAS.
>>
>> It also removes the sparc specific sem_* and pthread_barrier_*
>> implementations.  It in turn allows buidling against a LEON3/LEON4
>> sparcv8 target, although it will still be incompatible with generic
>> sparcv9.
>>
>> Checked on sparcv9-linux-gnu and sparc64-linux-gnu.  I also checked
>> with build against sparcv8-linux-gnu with -mcpu=leon3.
> 
> I tested this on LEON vith the nptl-tests, and it works fine!
> 
> I still think that it would be useful to have kernel emulation for these
> atomics for sparc32 running on v8 or v9 in the future. If not in glibc,
> perhaps it could be solved by trapping to the kernel from the compiler
> builtins when compiling for Linux, via some option that GLIBC can enable
> when building for a new enough kernel.
> 
> Tested-by: Andreas Larsson <andreas@gaisler.com>

I will commit this shortly if no one opposes it, I am just finishing
a smoke test on sparcv9 and sparc64.


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