RTX5: fixed __get_PSP function for Cortex-A on IAR (#288)

pull/5628/head
Vladimir Umek 2017-12-08 10:16:38 +01:00 committed by TomoYamanaka
parent 11ec7a2209
commit 0ff62f6b9e
1 changed files with 6 additions and 1 deletions

View File

@ -73,12 +73,17 @@ static __asm uint32_t __get_PSP (void) {
bx lr
}
#else
#ifdef __ICCARM__
__arm
#endif
__STATIC_INLINE uint32_t __get_PSP (void) {
register uint32_t ret;
__asm volatile (
__ASM volatile (
#ifndef __ICCARM__
".syntax unified\n\t"
".arm\n\t"
#endif
"sub sp,sp,#4\n\t"
"stm sp,{sp}^\n\t"
"pop {%[ret]}\n\t"