This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: atomic support for LEON3 platform
- From: Deng Hengyi <wei dot a dot yang at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc at gcc dot gnu dot org, Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Date: Tue, 23 Jul 2013 21:29:34 +0800
- Subject: Re: atomic support for LEON3 platform
- References: <3783184A-62C7-4F77-807A-5F5D32482DD7 at gmail dot com> <201307222354 dot 22907 dot ebotcazou at adacore dot com>
在 2013-7-23,上午5:54,Eric Botcazou <ebotcazou@adacore.com> 写道:
>> Recently i am working on the atomic support for RTEMS. Our basic idea is to
>> integrate the C11 atomic API into RTEMS. we have integrated the
>> stdatomic.h into newlib which is used by RTEMS. And when we test the
>> atomic ops on LEON3 platform (an important platform for RTEMS to test and
>> verify SMP support) it posted that there is no defined functions like
>> "__atomic_fetch_add_xx". And this is because of SPARC V7-V8 lacks of
>> compare and swap instruction., GCC also does not support those build in
>> ops. But for LEON3 it is a special case, it has its own casa instruction
>> to support compare_and_swap function. So i wonder whether gcc can consider
>> support LEON3 build in atomic ops.
>
> Sure, patches to that effect are welcome. This will need to be coordinated
> with binutils because the assembler will very likely reject the instructions
> if it is passed -Av8 as is currently done for LEON/LEON3. As a matter of fact,
> I just installed a patch to add basic LEON3 support on the trunk so almost
> everything is already there as far as the compiler is concerned.
>
Hi Eric, do you mean that you already have a patch to solve this issue which is just not merged to mainline? If yes could you send me your patch and tell me to how enable this feature? Thank you!
> --
> Eric Botcazou