1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #4126 from gebart/pr/cortexm-r7-O0-fix

cortexm-common: Workaround for error: r7 cannot be used in asm here
This commit is contained in:
Joakim Nohlgård 2015-10-28 07:01:32 +01:00
commit 3033738e30

View File

@ -164,11 +164,11 @@ void hard_fault_default(void)
" out: \n" /* } */
#if (__CORTEX_M == 0)
"push {r4-r7} \n" /* save r4..r7 to the stack */
"mov r4, r8 \n" /* */
"mov r5, r9 \n" /* */
"mov r6, r10 \n" /* */
"mov r7, r11 \n" /* */
"push {r4-r7} \n" /* save r8..r11 to the stack */
"mov r3, r8 \n" /* */
"mov r4, r9 \n" /* */
"mov r5, r10 \n" /* */
"mov r6, r11 \n" /* */
"push {r3-r6} \n" /* save r8..r11 to the stack */
#else
"push {r4-r11} \n" /* save r4..r11 to the stack */
#endif
@ -178,7 +178,7 @@ void hard_fault_default(void)
: [sram] "r" (&_sram + HARDFAULT_HANDLER_REQUIRED_STACK_SPACE),
[eram] "r" (&_eram),
[estack] "r" (&_estack)
: "r4","r5","r6","r7","r8","r9","r10","r11","lr"
: "r0","r4","r5","r6","r8","r9","r10","r11","lr"
);
}