summaryrefslogtreecommitdiff
path: root/x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'x86.h')
-rw-r--r--x86.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/x86.h b/x86.h
index 2ac51e5..a24214d 100644
--- a/x86.h
+++ b/x86.h
@@ -39,6 +39,15 @@ outsl(int port, const void *addr, int cnt)
"cc");
}
+static inline uint
+read_ebp(void)
+{
+ uint ebp;
+
+ asm volatile("movl %%ebp, %0" : "=a" (ebp));
+ return ebp;
+}
+
struct segdesc;
static inline void