arch: add volatile for regs in up_dump_register function

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21 2022-12-27 11:27:30 +08:00 committed by Xiang Xiao
parent 17639af0a8
commit f31ea8af7f
4 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ uintptr_t up_getusrsp(void)
void up_dump_register(FAR void *dumpregs) void up_dump_register(FAR void *dumpregs)
{ {
#ifdef CONFIG_DEBUG_INFO #ifdef CONFIG_DEBUG_INFO
FAR uint32_t *regs = dumpregs ? dumpregs : g_current_regs; FAR volatile uint32_t *regs = dumpregs ? dumpregs : g_current_regs;
_alert("R0 :%08x R1 :%08x R2 :%08x R3 :%08x " _alert("R0 :%08x R1 :%08x R2 :%08x R3 :%08x "
"R4 :%08x R5 :%08x R6 :%08x R7 :%08x\n" "R4 :%08x R5 :%08x R6 :%08x R7 :%08x\n"

View File

@ -52,7 +52,7 @@ uintptr_t up_getusrsp(void)
void up_dump_register(FAR void *dumpregs) void up_dump_register(FAR void *dumpregs)
{ {
FAR chipreg_t *regs = dumpregs ? dumpregs : g_current_regs; FAR volatile chipreg_t *regs = dumpregs ? dumpregs : g_current_regs;
#ifdef CONFIG_EZ80_Z80MODE #ifdef CONFIG_EZ80_Z80MODE
_alert("AF: %04x I: %04x\n", _alert("AF: %04x I: %04x\n",

View File

@ -52,7 +52,7 @@ uintptr_t up_getusrsp(void)
void up_dump_register(FAR void *dumpregs) void up_dump_register(FAR void *dumpregs)
{ {
FAR chipreg_t *regs = dumpregs ? dumpregs : g_current_regs; FAR volatile chipreg_t *regs = dumpregs ? dumpregs : g_current_regs;
_alert("AF: %04x I: %04x\n", _alert("AF: %04x I: %04x\n",
regs[XCPT_AF], regs[XCPT_I]); regs[XCPT_AF], regs[XCPT_I]);

View File

@ -52,7 +52,7 @@ uintptr_t up_getusrsp(void)
void up_dump_register(FAR void *dumpregs) void up_dump_register(FAR void *dumpregs)
{ {
FAR chipreg_t *regs = dumpregs ? dumpregs : g_current_regs; FAR volatile chipreg_t *regs = dumpregs ? dumpregs : g_current_regs;
_alert("AF: %04x I: %04x\n", _alert("AF: %04x I: %04x\n",
regs[XCPT_AF], regs[XCPT_I]); regs[XCPT_AF], regs[XCPT_I]);