mirror of
https://github.com/apache/nuttx.git
synced 2025-01-12 22:08:35 +08:00
arch: up_getusrsp change to inline and implement in irq.h
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
1358942132
commit
89455bc9a1
53 changed files with 205 additions and 263 deletions
|
@ -362,6 +362,12 @@ static always_inline_function uint32_t up_getsp(void)
|
|||
return sp;
|
||||
}
|
||||
|
||||
static always_inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
static always_inline_function bool up_interrupt_context(void)
|
||||
{
|
||||
return getipsr() != 0;
|
||||
|
|
|
@ -473,6 +473,12 @@ static inline_function uint32_t up_getsp(void)
|
|||
return sp;
|
||||
}
|
||||
|
||||
static inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
noinstrument_function
|
||||
static inline_function void up_set_interrupt_context(bool flag)
|
||||
{
|
||||
|
|
|
@ -512,6 +512,12 @@ static always_inline_function uint32_t up_getsp(void)
|
|||
return sp;
|
||||
}
|
||||
|
||||
static always_inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
static always_inline_function bool up_interrupt_context(void)
|
||||
{
|
||||
return getipsr() != 0;
|
||||
|
|
|
@ -468,6 +468,12 @@ static inline_function uint32_t up_getsp(void)
|
|||
return sp;
|
||||
}
|
||||
|
||||
static inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
noinstrument_function
|
||||
static inline_function void up_set_interrupt_context(bool flag)
|
||||
{
|
||||
|
|
|
@ -487,6 +487,12 @@ static always_inline_function uint32_t up_getsp(void)
|
|||
return sp;
|
||||
}
|
||||
|
||||
static always_inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
static always_inline_function bool up_interrupt_context(void)
|
||||
{
|
||||
return getipsr() != 0;
|
||||
|
|
|
@ -468,6 +468,12 @@ static inline_function uint32_t up_getsp(void)
|
|||
return sp;
|
||||
}
|
||||
|
||||
static inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
noinstrument_function
|
||||
static inline_function void up_set_interrupt_context(bool flag)
|
||||
{
|
||||
|
|
|
@ -262,6 +262,12 @@ static inline_function uint32_t up_getsp(void)
|
|||
return sp;
|
||||
}
|
||||
|
||||
static inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
noinstrument_function
|
||||
static inline_function bool up_interrupt_context(void)
|
||||
{
|
||||
|
|
|
@ -43,16 +43,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -462,6 +462,14 @@ static inline_function void up_irq_restore(irqstate_t flags)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uintptr_t *)((regs) ? (regs) : running_regs()))[REG_ELR])
|
||||
|
||||
#ifndef CONFIG_BUILD_KERNEL
|
||||
# define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint64_t *)(regs))[REG_SP_ELX])
|
||||
#else
|
||||
# define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint64_t *)(regs))[REG_SP_EL0])
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -46,19 +46,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
#ifndef CONFIG_BUILD_KERNEL
|
||||
return ((uint64_t *)regs)[REG_SP_ELX];
|
||||
#else
|
||||
return ((uint64_t *)regs)[REG_SP_EL0];
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -126,6 +126,13 @@ static inline_function void up_set_current_regs(FAR uint8_t *regs)
|
|||
|
||||
#define up_interrupt_context() (up_current_regs() != NULL)
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint8_t *)(regs))[REG_R13])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -40,16 +40,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint8_t *ptr = regs;
|
||||
return ptr[REG_R13];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -40,16 +40,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint8_t *ptr = regs;
|
||||
return ptr[REG_R13];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -175,6 +175,13 @@ static inline_function bool up_interrupt_context(void)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint32_t *)((regs) ? (regs) : up_current_regs()))[REG_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint32_t*)(regs))[REG_SP])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -37,16 +37,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -127,6 +127,16 @@ static inline_function void up_set_current_regs(FAR uint8_t *regs)
|
|||
|
||||
#define up_interrupt_context() (up_current_regs() != NULL)
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
static inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint8_t *ptr = regs;
|
||||
return (uintptr_t)(ptr[REG_SPH] << 8 | ptr[REG_SPL]);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
|
|
@ -38,16 +38,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint8_t *ptr = regs;
|
||||
return (uintptr_t)(ptr[REG_SPH] << 8 | ptr[REG_SPL]);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -138,6 +138,13 @@ static inline_function void up_set_current_regs(uint32_t *regs)
|
|||
#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])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -40,16 +40,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -308,5 +308,12 @@ struct xcptcontext
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint32_t *)((regs) ? (regs) : up_current_regs()))[REG_CSR_MEPC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint32_t *)(regs))[REG_X2])
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_MISOC_INCLUDE_MINERVA_IRQ_H */
|
||||
|
|
|
@ -39,16 +39,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -39,16 +39,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_X2];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -157,6 +157,13 @@ static inline_function bool up_interrupt_context(void)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint32_t *)((regs) ? (regs) : up_current_regs()))[REG_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint32_t *)(regs))[REG_R13])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -38,16 +38,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_R13];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -350,6 +350,16 @@ static inline_function irqstate_t up_irq_enable(void)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint32_t *)((regs) ? (regs) : up_current_regs()))[REG_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
static inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint8_t *ptr = regs;
|
||||
return (uintptr_t)(ptr[REG_SP] << 8 | ptr[REG_SP + 1]);
|
||||
}
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1088,6 +1088,13 @@ static inline_function void up_irq_restore(irqstate_t flags)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint32_t *)((regs) ? (regs) : up_current_regs()))[REG_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint32_t *)(regs))[REG_SP])
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ARCH_RENESAS_INCLUDE_RX65N_IRQ_H */
|
||||
|
|
|
@ -571,6 +571,13 @@ static inline_function void up_irq_restore(irqstate_t flags)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint32_t *)((regs) ? (regs) : up_current_regs()))[REG_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint32_t *)(regs))[REG_SP])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -39,16 +39,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint8_t *ptr = regs;
|
||||
return (uintptr_t)(ptr[REG_SP] << 8 | ptr[REG_SP + 1]);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -41,16 +41,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -38,16 +38,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -830,6 +830,13 @@ noinstrument_function static inline_function bool up_interrupt_context(void)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uintptr_t *)((regs) ? (regs) : running_regs()))[REG_EPC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
(((uintptr_t*)(regs))[REG_SP])
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
|
|
@ -39,16 +39,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uintptr_t *ptr = regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -183,6 +183,13 @@ static inline_function bool up_interrupt_context(void)
|
|||
#define up_getusrpc(regs) \
|
||||
(((xcpt_reg_t *)((regs) ? (regs) : up_current_regs()))[JB_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((xcpt_reg_t *)(regs))[JB_SP])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -34,16 +34,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
xcpt_reg_t *ptr = regs;
|
||||
return ptr[JB_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -175,6 +175,13 @@ static inline_function bool up_interrupt_context(void)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint32_t *)((regs) ? (regs) : up_current_regs()))[REG_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint32_t *)(regs))[REG_I6])
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
|
|
@ -39,16 +39,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_I6];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -186,6 +186,26 @@ static inline_function bool up_interrupt_context(void)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
static inline_function uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uintptr_t *csa = regs;
|
||||
|
||||
while (((uintptr_t)csa & PCXI_UL) == 0)
|
||||
{
|
||||
csa = tricore_csa2addr((uintptr_t)csa);
|
||||
csa = (uintptr_t *)csa[0];
|
||||
}
|
||||
|
||||
csa = tricore_csa2addr((uintptr_t)csa);
|
||||
|
||||
return csa[REG_SP];
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#undef EXTERN
|
||||
|
|
|
@ -39,25 +39,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uintptr_t *csa = regs;
|
||||
|
||||
while (((uintptr_t)csa & PCXI_UL) == 0)
|
||||
{
|
||||
csa = tricore_csa2addr((uintptr_t)csa);
|
||||
csa = (uintptr_t *)csa[0];
|
||||
}
|
||||
|
||||
csa = tricore_csa2addr((uintptr_t)csa);
|
||||
|
||||
return csa[REG_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -120,6 +120,13 @@ static inline_function void up_set_current_regs(uint32_t *regs)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint32_t *)((regs) ? (regs) : up_current_regs()))[REG_EIP])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint32_t *)(regs))[REG_ESP])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -35,16 +35,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_ESP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -182,6 +182,13 @@ static inline_function void up_set_interrupt_context(bool flag)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint64_t *)((regs) ? (regs) : running_regs()))[REG_RIP])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((uint64_t *)(regs))[REG_RSP])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -37,16 +37,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uint64_t *ptr = regs;
|
||||
return ptr[REG_RSP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: x86_64_registerdump
|
||||
****************************************************************************/
|
||||
|
|
|
@ -468,6 +468,13 @@ noinstrument_function static inline_function bool up_interrupt_context(void)
|
|||
#define up_getusrpc(regs) \
|
||||
(((uint32_t *)((regs) ? (regs) : running_regs()))[REG_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
(((uintptr_t*)(regs))[REG_A1])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -39,16 +39,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
uintptr_t *ptr = regs;
|
||||
return ptr[REG_A1];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -112,6 +112,13 @@ static inline_function void up_set_current_regs(FAR chipreg_t *regs)
|
|||
#define up_getusrpc(regs) \
|
||||
(((FAR chipreg_t *)((regs) ? (regs) : up_current_regs()))[REG_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((FAR uint32_t*)(regs))[REG_SP])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -35,16 +35,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(FAR void *regs)
|
||||
{
|
||||
FAR uint32_t *ptr = regs;
|
||||
return ptr[REG_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -57,6 +57,13 @@ uintptr_t up_getsp(void);
|
|||
#define up_getusrpc(regs) \
|
||||
(((FAR chipreg_t *)((regs) ? (regs) : up_current_regs()))[XCPT_PC])
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
#define up_getusrsp(regs) \
|
||||
((uintptr_t)((FAR chipreg_t*)(regs))[XCPT_SP])
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -38,16 +38,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(FAR void *regs)
|
||||
{
|
||||
FAR chipreg_t *ptr = regs;
|
||||
return ptr[XCPT_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -38,16 +38,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(FAR void *regs)
|
||||
{
|
||||
FAR chipreg_t *ptr = regs;
|
||||
return ptr[XCPT_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -57,16 +57,6 @@ static inline void z8_dumpstate(chipreg_t sp, chipreg_t pc, uint8_t irqctl,
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(FAR void *regs)
|
||||
{
|
||||
FAR chipreg_t *ptr = regs;
|
||||
return ptr[XCPT_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -38,16 +38,6 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(FAR void *regs)
|
||||
{
|
||||
FAR chipreg_t *ptr = regs;
|
||||
return ptr[XCPT_SP];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_dump_register
|
||||
****************************************************************************/
|
||||
|
|
|
@ -2112,7 +2112,9 @@ int up_timer_tick_start(clock_t ticks);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(FAR void *regs);
|
||||
/* static inline_function uintptr_t up_getusrsp(void *regs);
|
||||
* The actual implementation should be provided in irq.h per arch.
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* TLS support
|
||||
|
|
Loading…
Reference in a new issue