https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60925
Carlos O'Donell <carlos at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carlos at redhat dot com --- Comment #13 from Carlos O'Donell <carlos at redhat dot com> --- For the record I made glibc use %r5 and saved/restored %r1 as required around the syscall. I also added more clobbers in the event of future changes to the kernel interface. This works around the "can't find a register in class FOO while reloading 'asm'" error from the compiler. The real culprit here is atomic.h in glibc and the asm in question is the atomic compare and exchange that is being done via the light-weight kernel syscall.