mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
More QEMU logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3337 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ static inline void outl(uint32_t regval, uint16_t port)
|
||||
);
|
||||
}
|
||||
|
||||
static inline uint32_t inl(uint32_t port)
|
||||
static inline uint32_t inl(uint16_t port)
|
||||
{
|
||||
uint32_t regval;
|
||||
asm volatile(
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
# include <stdbool.h>
|
||||
# include <arch/arch.h>
|
||||
|
||||
Reference in New Issue
Block a user