* Segher Boessenkool: > On Wed, Jan 29, 2020 at 05:19:19PM +0100, Florian Weimer wrote: >> * Segher Boessenkool: >> >> But GCC doesn't expose them as integers to C code, so you can't do much >> >> without them. >> > >> > Sure, it doesn't expose any other registers directly, either. >> >> I can use r0 & 1 with a register variable r0 to check a bit. > > That is not reliable, or supported, and it *will* break. This is > explicit for local register asm, and global register asm is > underdefined.
Ugh. I did not know that. And neither did the person who wrote powerpc64/sysdep.h because it uses register variables in regular C expressions. 8-( Other architectures are affected as well. One set of issues is less of a problem if system call arguments are variables and not complex expressions, so that side effects do not clobber registers in the initialization: register long __a0 asm ("$4") = (long) (arg1); But I wasn't aware of that constraint on the macro users at all. Thanks, Florian