diff options
author | scottl <scottl@FreeBSD.org> | 2014-11-22 00:01:14 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2014-11-22 00:01:14 +0000 |
commit | 7dd73de9acc101ba66bf2c6710943de299443f79 (patch) | |
tree | 36e294bb21907b60aed9f9d035ec89e3ee00cb70 /sys/amd64/include/asmacros.h | |
parent | 95f3efce798ee66d1efb2960539cee6149d60aa2 (diff) | |
download | FreeBSD-src-7dd73de9acc101ba66bf2c6710943de299443f79.zip FreeBSD-src-7dd73de9acc101ba66bf2c6710943de299443f79.tar.gz |
MFC r274489:
Add frame pointers to ASM functions in support.S
Obtained from: Netflix
Diffstat (limited to 'sys/amd64/include/asmacros.h')
-rw-r--r-- | sys/amd64/include/asmacros.h | 10 |
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. |