This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
mis-handling of arm semihosting in libgloss/arm/crt0.S
- From: Can Finner <can dot finner at gmail dot com>
- To: newlib at sources dot redhat dot com
- Date: Sat, 11 Jun 2011 12:54:25 +0800
- Subject: mis-handling of arm semihosting in libgloss/arm/crt0.S
Hi,
I noticed that in libgloss/arm/crt0.S, there are codes handling
semihosting like:
#if defined(__thumb2__)
bkpt AngelSWI
#else
/* We are always in ARM mode for startup */
AngelSWIAsm AngelSWI_ARM
#endif
This seems not appropriate. as in semihosting doc:
" If you are compiling for the ARMv6-M or ARMv7-M, the Thumb BKPT
instruction is
used instead of the Thumb SVC instruction. Both BKPT and SVC take an
8-bit immediate
value. In all other respects, semihosting is the same for all
supported ARM processors."
Here __thumb2__ not only stands for ARMv7-M processor, but also for
thumb state on
ARMv7-A/R processors, which should use svc instead, since there are
not thumb only architectures.
Is it right? Thanks.
--
Regards.