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