sim: correct save irq flags error when use sim 64bits
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
8aecad287c
commit
16367aa084
@ -88,10 +88,11 @@
|
||||
#define sim_saveusercontext(saveregs) \
|
||||
({ \
|
||||
irqstate_t flags = up_irq_flags(); \
|
||||
uint32_t *env = (uint32_t *)saveregs + JB_FLAG; \
|
||||
xcpt_reg_t *env = saveregs; \
|
||||
uint32_t *val = (uint32_t *)&env[JB_FLAG]; \
|
||||
\
|
||||
env[0] = flags & UINT32_MAX; \
|
||||
env[1] = (flags >> 32) & UINT32_MAX; \
|
||||
val[0] = flags & UINT32_MAX; \
|
||||
val[1] = (flags >> 32) & UINT32_MAX; \
|
||||
\
|
||||
setjmp(saveregs); \
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user