commit 29c054df817d55ae6e0fc3bd4c9e2343a2b4ca75
parent 7914ab721436d3c21623010dfab2dc326bf49279
Author: Austin Clements <amdragon@mit.edu>
Date: Tue, 31 Aug 2010 17:07:54 -0400
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.
Diffstat:
M | x86.h | | | 30 | +++++++++++------------------- |
1 file changed, 11 insertions(+), 19 deletions(-)
diff --git a/x86.h b/x86.h
@@ -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)
{
@@ -153,6 +138,13 @@ xchg(volatile uint *addr, uint newval)
}
static inline void
+nop_pause(void)
+{
+ asm volatile("pause" : :);
+}
+
+//PAGEBREAK!
+static inline void
lcr0(uint val)
{
asm volatile("movl %0,%%cr0" : : "r" (val));