diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-05 00:01:21 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-05 00:01:21 +0000 |
commit | d4d884ccde2057574f9846c8a4aad91c68874f81 (patch) | |
tree | 743c714a95e75cabbb64ac865b865627c0d20100 /nuttx/arch/x86/include/i486/arch.h | |
parent | 55d4f54ef204271e27703b5e7a89d58c13c2b294 (diff) | |
download | px4-nuttx-d4d884ccde2057574f9846c8a4aad91c68874f81.tar.gz px4-nuttx-d4d884ccde2057574f9846c8a4aad91c68874f81.tar.bz2 px4-nuttx-d4d884ccde2057574f9846c8a4aad91c68874f81.zip |
More QEMU logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3337 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/x86/include/i486/arch.h')
-rwxr-xr-x | nuttx/arch/x86/include/i486/arch.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nuttx/arch/x86/include/i486/arch.h b/nuttx/arch/x86/include/i486/arch.h index 89901cb0a..fcce94fa4 100755 --- a/nuttx/arch/x86/include/i486/arch.h +++ b/nuttx/arch/x86/include/i486/arch.h @@ -44,6 +44,11 @@ * Included Files ****************************************************************************/ +#include <nuttx/config.h> +#ifndef __ASSEMBLY__ +# include <stdint.h> +#endif + /**************************************************************************** * Definitions ****************************************************************************/ @@ -80,6 +85,22 @@ * Inline functions ****************************************************************************/ +#ifndef __ASSEMBLY__ + +/* Return stack pointer */ + +static inline uint32_t up_getsp() +{ + uint32_t regval; + + asm volatile( + "\tmovl %%esp, %0\n" + : "=rm" (regval) + : + : "memory"); + return regval; +} + /**************************************************************************** * Public Types ****************************************************************************/ @@ -104,5 +125,6 @@ extern "C" { } #endif +#endif /* __ASSEMBLY__ */ #endif /* __ARCH_X86_INCLUDE_I486_ARCH_H */ |