[Bug target/107032] ARM: libgcc2.c:2174:1: error: r7 cannot be used in 'asm' here
clyon at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 26 08:01:06 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107032
Christophe Lyon <clyon at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clyon at gcc dot gnu.org
--- Comment #1 from Christophe Lyon <clyon at gcc dot gnu.org> ---
At quick glance, I think this is caused by the definition of CLEAR_INSN_CACHE
in gcc/config/arm/uclinux-eabi.h:
/* Clear the instruction cache from `beg' to `end'. This makes an
inline system call to SYS_cacheflush. */
#undef CLEAR_INSN_CACHE
#define CLEAR_INSN_CACHE(BEG, END) \
{ \
register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
register unsigned long _end __asm ("a2") = (unsigned long) (END); \
register unsigned long _flg __asm ("a3") = 0; \
register unsigned long _scno __asm ("r7") = 0xf0002; \
__asm __volatile ("swi 0x0 @ sys_cacheflush" \
: "=r" (_beg) \
: "0" (_beg), "r" (_end), "r" (_flg), "r" (_scno)); \
}
which makes explicit use of r7.
This code has been like that since it was committed in 2007....
So I suspect nobody ever tried to build this configuration.
More information about the Gcc-bugs
mailing list