Attached patch implements TARGET_ATOMIC_ASSIGN_EXPAND_FENV for AARCH64. With this, atomic test-case gcc.dg/atomic/c11-atomic-exec-5.c now PASS. This implementation is based on SPARC and i386 implementations. Regression tested on qemu-aarch64 for aarch64-none-linux-gnu with no new regression. Is this OK for trunk? Thanks, Kugan gcc/ +2014-04-27 Kugan Vivekanandarajah + + * config/aarch64/aarch64.c (TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New + define. + * config/aarch64/aarch64-builtins.c (arm_builtins) : Add + AARCH64_BUILTIN_LDFPSCR and AARCH64_BUILTIN_STFPSCR. + (aarch64_init_builtins) : Initialize builtins + __builtins_aarch64_stfpscr and __builtins_aarch64_ldfpscr. + (aarch64_expand_builtin) : Expand builtins __builtins_aarch64_stfpscr + and __builtins_aarch64_ldfpscr. + (aarch64_atomic_assign_expand_fenv): New function. + * config/aarch64/aarch64.md (stfpscr): New pattern. + (ldfpscr) : Likewise. + (unspecv): Add UNSPECV_LDFPSCR and UNSPECV_STFPSCR. +