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] |
#define AngelSWI_ARM 0x123456 #ifdef __thumb__ #define AngelSWI 0xAB #else #define AngelSWI AngelSWI_ARM #endif
So, your patch + AngelSWIAsm AngelSWI ldr r0, .LC0 /* point at values read */
will use 0xAB for all thumb state, which is only correct for thumb2 and armv6-m here. Considering thumb state on architecture pre armv6, as the comment, we are always in ARM mode for startup for these architectures, and should use 0x123456 for these archs here.
#if defined __thumb__ && ! defined __thumb2__ /* When in thumb mode, but not supporting thumb2 insns, we will always start execution in ARM mode, so use the ARM mode SWI. */ AngelSWIAsm AngelSWI_ARM #else AngelSWIAsm AngelSWI #endif
actually found this problem during my work on supporting armv7-m/armv6-m in libgloss/arm and have already worked out a patch. Hoping I could pass internal review and send it to newlib list ASAP. Please help me review it then. :(
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |