在 2013-7-23,上午5:54,Eric Botcazou <ebotca...@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

Reply via email to