arm/irq.h: fix ARCH_ARM7TDMI missing up_getusrsp after move to irq.h
Causing c5471evm/httpd ci break. Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
55da7d89b5
commit
7e0e4dea75
1 changed files with 19 additions and 0 deletions
|
@ -256,6 +256,25 @@ static inline_function void up_set_interrupt_context(bool flag)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline_function uint32_t up_getsp(void)
|
||||||
|
{
|
||||||
|
register uint32_t sp;
|
||||||
|
|
||||||
|
__asm__ __volatile__
|
||||||
|
(
|
||||||
|
"mov %0, sp\n"
|
||||||
|
: "=r" (sp)
|
||||||
|
);
|
||||||
|
|
||||||
|
return sp;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline_function uintptr_t up_getusrsp(void *regs)
|
||||||
|
{
|
||||||
|
uint32_t *ptr = (uint32_t *)regs;
|
||||||
|
return ptr[REG_SP];
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
Loading…
Reference in a new issue