From 91d34ffd094d9f5b5c96dcfceac613df8c77a6c7 Mon Sep 17 00:00:00 2001 From: zhangyuan21 Date: Mon, 17 Apr 2023 16:53:07 +0800 Subject: [PATCH] arch/sim: add up_getusrsp for sim Signed-off-by: zhangyuan21 --- arch/sim/src/sim/sim_registerdump.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/sim/src/sim/sim_registerdump.c b/arch/sim/src/sim/sim_registerdump.c index 4b7a1f5641..f640adfd0c 100644 --- a/arch/sim/src/sim/sim_registerdump.c +++ b/arch/sim/src/sim/sim_registerdump.c @@ -32,6 +32,16 @@ * Public Functions ****************************************************************************/ +/**************************************************************************** + * Name: up_getusrsp + ****************************************************************************/ + +uintptr_t up_getusrsp(void *regs) +{ + xcpt_reg_t *ptr = regs; + return ptr[JB_SP]; +} + /**************************************************************************** * Name: up_dump_register ****************************************************************************/