Remove stack pointer from clobber list

This fixes an issue when compiling with GCC 9.1:
"In function 'void early_start_checks()': error: listing the stack pointer register 'sp' in a clobber list is deprecated [-Werror=deprecated]"

Corresponds fix in upstream ARM CMSIS:
https://github.com/ARM-software/CMSIS_5/commit/a07b56505471fd789111bd7dba726461449cc261
This commit is contained in:
Samuel Sadok
2019-05-29 12:36:05 +02:00
parent 4ecaba769f
commit 53c70bee20
@@ -161,7 +161,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
*/
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
{
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) : "sp");
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) : );
}
@@ -187,7 +187,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
*/
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
{
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : "sp");
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : );
}