summaryrefslogtreecommitdiff
path: root/nuttx/arch/x86/include/i486/arch.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-05 00:01:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-05 00:01:21 +0000
commitd4d884ccde2057574f9846c8a4aad91c68874f81 (patch)
tree743c714a95e75cabbb64ac865b865627c0d20100 /nuttx/arch/x86/include/i486/arch.h
parent55d4f54ef204271e27703b5e7a89d58c13c2b294 (diff)
downloadpx4-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-xnuttx/arch/x86/include/i486/arch.h22
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 */