arch: up_getusrsp change to inline and implement in irq.h

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen
2024-12-31 17:00:17 +08:00
committed by Xiang Xiao
parent 1358942132
commit 89455bc9a1
53 changed files with 205 additions and 263 deletions
+7
View File
@@ -227,5 +227,12 @@ struct xcptcontext
#define up_getusrpc(regs) \
(((uint32_t *)((regs) ? (regs) : up_current_regs()))[REG_EPC])
/****************************************************************************
* Name: up_getusrsp
****************************************************************************/
#define up_getusrsp(regs) \
((uintptr_t)((uint32_t *)(regs))[REG_SP])
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_MISOC_INCLUDE_LM32_IRQ_H */