summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/asmacros.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/include/asmacros.h')
-rw-r--r--sys/amd64/include/asmacros.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/amd64/include/asmacros.h b/sys/amd64/include/asmacros.h
index 1fb592a..ce4c91a 100644
--- a/sys/amd64/include/asmacros.h
+++ b/sys/amd64/include/asmacros.h
@@ -132,6 +132,16 @@
#define MEXITCOUNT
#endif /* GPROF */
+/*
+ * Convenience for adding frame pointers to hand-coded ASM. Useful for
+ * DTrace, HWPMC, and KDB.
+ */
+#define PUSH_FRAME_POINTER \
+ pushq %rbp ; \
+ movq %rsp, %rbp ;
+#define POP_FRAME_POINTER \
+ popq %rbp
+
#ifdef LOCORE
/*
* Convenience macro for declaring interrupt entry points.
OpenPOWER on IntegriCloud