From 753e4d64eeac38fc72795fd5021200938d9ba951 Mon Sep 17 00:00:00 2001 From: chenxiaoyi Date: Tue, 2 Jul 2024 11:27:26 +0800 Subject: [PATCH] sim/irq: fix windows64 build error nuttx\vs2022\include\arch\irq.h(144,9): error C2065: 'mov': undeclared identifier Signed-off-by: chenxiaoyi --- arch/sim/include/irq.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/sim/include/irq.h b/arch/sim/include/irq.h index 4c712a21b7..1b2d31b024 100644 --- a/arch/sim/include/irq.h +++ b/arch/sim/include/irq.h @@ -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