Hi Eric, Thank you very much for your work. I will test it ASAP
WeiY Best Regards 在 2013-8-9,下午5:06,Eric Botcazou <ebotca...@adacore.com> 写道: > This enables access to the atomic compare-and-swap on LEON3 in conjunction > with > the binutils patch at: > http://sourceware.org/ml/binutils/2013-08/msg00038.html > > Tested on SPARC/Solaris and sparc-elf, applied on the mainline. > > > 2013-08-09 Eric Botcazou <ebotca...@adacore.com> > > * configure.ac: Add GAS check for LEON instructions on SPARC. > * configure: Regenerate. > * config.in: Likewise. > * config.gcc (with_cpu): Remove sparc-leon*-* and deal with LEON in the > sparc*-*-* block. > * config/sparc/sparc.opt (LEON, LEON3): New masks. > * config/sparc/sparc.h (ASM_CPU32_DEFAULT_SPEC): Set to AS_LEON_FLAG > for LEON or LEON3. > (ASM_CPU_SPEC): Pass AS_LEON_FLAG if -mcpu=leon or -mcpu=leon3. > (AS_LEON_FLAG): New macro. > * config/sparc/sparc.c (sparc_option_override): Set MASK_LEON for leon > and MASK_LEON3 for leon3 and unset them if HAVE_AS_LEON is not defined. > Deal with LEON and LEON3 for the memory model. > * config/sparc/sync.m (atomic_compare_and_swap<mode>): Enable for LEON3 > (atomic_compare_and_swap<mode>_1): Likewise. > (*atomic_compare_and_swap<mode>_1): Likewise. > > > -- > Eric Botcazou > <p.diff>