This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]