https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107032
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-09-27 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #6 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- In Thumb code r7 is the frame pointer, so can't be used in inline assembler without a dance whenever the frame pointer might be needed. I'm surprised this hasn't shown up before. We're going to need a separate definition of this macro when compiling for Thumb as you can't easily rewrite this. The code will need to do something like mov scratch, r7 mov r7, #<syscall-value> svc 0 mov r7, scratch