sim/irq: fix windows64 build error

nuttx\vs2022\include\arch\irq.h(144,9): error C2065: 'mov': undeclared identifier

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
This commit is contained in:
chenxiaoyi 2024-07-02 11:27:26 +08:00 committed by Xiang Xiao
parent d309d49cae
commit 753e4d64ee

View File

@ -138,9 +138,8 @@ static inline_function void up_set_current_regs(xcpt_reg_t *regs)
static inline uintptr_t up_getsp(void)
{
#ifdef _MSC_VER
uintptr_t regval;
__asm mov regval, esp;
return regval;
uintptr_t tmp;
return (uintptr_t)&tmp;
#else
return (uintptr_t)__builtin_frame_address(0);
#endif