On Thu, Jan 10, 2013 at 10:38 AM, Prasad Joshi <prasadjoshi...@gmail.com> wrote: > > I recently joined this mailing list and I was particularly interested > in knowing how the atomic built-ins > (http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html) are > implemented in gcc. > > I skimmed through the source code (mostly libgcc/sync.c file), however > it looks like it is hidden behind some macros. It would be good if > someone could help me find the source code. Also it would be of great > help if someone could also point me to link which contains description > of how the synchronization builtins are implemented in GCC.
For a particular CPU, look at gcc/config/CPU/sync.md. Ian