diff options
Diffstat (limited to 'include/linux/instruction_pointer.h')
-rw-r--r-- | include/linux/instruction_pointer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/instruction_pointer.h b/include/linux/instruction_pointer.h new file mode 100644 index 000000000..aa0b3ffea --- /dev/null +++ b/include/linux/instruction_pointer.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_INSTRUCTION_POINTER_H +#define _LINUX_INSTRUCTION_POINTER_H + +#include <asm/linkage.h> + +#define _RET_IP_ (unsigned long)__builtin_return_address(0) + +#ifndef _THIS_IP_ +#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) +#endif + +#endif /* _LINUX_INSTRUCTION_POINTER_H */ |