Backport atomics support for microblaze. This is derived from these two patches:
https://github.com/Xilinx/gcc/commit/c73d3fc40ab87f45514e08d7f9fa978f55cea20c
https://github.com/Xilinx/gcc/commit/5c0e5dcb905fe88ccf36917de0ea32c34f2a3d2f