[Bug target/107032] ARM: libgcc2.c:2174:1: error: r7 cannot be used in 'asm' here
rearnsha at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 27 10:55:21 GMT 2022
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
More information about the Gcc-bugs
mailing list