Skip to content
Snippets Groups Projects
Commit 29c054df authored by Austin Clements's avatar Austin Clements
Browse files

We don't use lesp/lebp and using them at all from C would be fraught with...

We don't use lesp/lebp and using them at all from C would be fraught with peril.  Keep resp/rebp, but fix their code style.
parent 7914ab72
No related branches found
No related tags found
No related merge requests found
......@@ -96,24 +96,16 @@ loadgs(ushort v)
asm volatile("movw %0, %%gs" : : "r" (v));
}
static inline void lebp(uint val)
{
asm volatile("movl %0,%%ebp" : : "r" (val));
}
static inline uint rebp(void)
static inline uint
rebp(void)
{
uint val;
asm volatile("movl %%ebp,%0" : "=r" (val));
return val;
}
static inline void lesp(uint val)
{
asm volatile("movl %0,%%esp" : : "r" (val));
}
static inline uint resp(void)
static inline uint
resp(void)
{
uint val;
asm volatile("movl %%esp,%0" : "=r" (val));
......@@ -132,13 +124,6 @@ sti(void)
asm volatile("sti");
}
static inline void
nop_pause(void)
{
asm volatile("pause" : :);
}
//PAGEBREAK!
static inline uint
xchg(volatile uint *addr, uint newval)
{
......@@ -152,6 +137,13 @@ xchg(volatile uint *addr, uint newval)
return result;
}
static inline void
nop_pause(void)
{
asm volatile("pause" : :);
}
//PAGEBREAK!
static inline void
lcr0(uint val)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment