!354 m4核在任务中异常时backtrace使用的是MSP所在的栈,而不是PSP所在的栈

Merge pull request !354 from zhangfanfan2/exc
This commit is contained in:
openharmony_ci 2021-10-27 13:51:47 +00:00 committed by Gitee
commit 454c234512
2 changed files with 10 additions and 8 deletions

View File

@ -30,7 +30,7 @@
*/ */
.syntax unified .syntax unified
.arch armv7e-m .arch armv7e-m
.fpu fpv5-d16 .fpu fpv4-sp-d16
.thumb .thumb
.equ OS_FPU_CPACR, 0xE000ED88 .equ OS_FPU_CPACR, 0xE000ED88

View File

@ -31,6 +31,7 @@
.syntax unified .syntax unified
.arch armv7e-m .arch armv7e-m
.fpu fpv4-sp-d16
.thumb .thumb
.section .text .section .text
@ -281,7 +282,7 @@ _ExcInMSP:
PUSH {R3} PUSH {R3}
MRS R12, PRIMASK // store message-->exc: disable int? MRS R12, PRIMASK // store message-->exc: disable int?
PUSH {R4-R12} // store message-->exc: {R4-R12} PUSH {R4-R12} // store message-->exc: {R4-R12}
#VPUSH {D8-D15} // FPU VPUSH {D8-D15} // FPU
B _handleEntry B _handleEntry
.fnend .fnend
@ -337,12 +338,13 @@ _hwiActiveCheckNext:
MRS R12, PRIMASK MRS R12, PRIMASK
PUSH {R4-R12} PUSH {R4-R12}
VPUSH {D8-D15} // FPU
// copy auto saved task register // copy auto saved task register
LDMFD R3!, {R4-R11} // R4-R11 store PSP reg(auto push when exc in task) LDMFD R3!, {R4-R11} // R4-R11 store PSP reg(auto push when exc in task)
#VLDMIA R3!, {D8-D15} // FPU VLDMIA R3!, {D8-D15} // FPU
#VSTMDB R2!, {D8-D15} // FPU VSTMDB R2!, {D8-D15} // FPU
STMFD R2!, {R4-R11} STMFD R2!, {R4-R11}
B _handleEntry B _handleEntry
.fnend .fnend