1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

cpu/cortexm_common: Remove register keyword from variables

register is deprecated when building C++11 code and removed in C++17,
using it will cause build failures with C++ and -Werror. The register
hint keyword is likely ignored in GCC anyway.
This commit is contained in:
Joakim Nohlgård 2016-06-01 16:12:38 +02:00
parent e2c9fee917
commit 73739cb7c8
2 changed files with 3 additions and 3 deletions

View File

@ -151,7 +151,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_xPSR(void)
*/
__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
{
register uint32_t result;
uint32_t result;
__ASM volatile ("MRS %0, psp\n" : "=r" (result) );
return(result);
@ -176,7 +176,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOf
*/
__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
{
register uint32_t result;
uint32_t result;
__ASM volatile ("MRS %0, msp\n" : "=r" (result) );
return(result);

View File

@ -63,7 +63,7 @@ void cortexm_init(void);
*/
static inline void cpu_print_last_instruction(void)
{
register uint32_t *lr_ptr;
uint32_t *lr_ptr;
__asm__ __volatile__("mov %0, lr" : "=r"(lr_ptr));
printf("%p\n", (void*) lr_ptr);
}