diff options
Diffstat (limited to 'coroutine/amd64')
-rw-r--r-- | coroutine/amd64/Context.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/coroutine/amd64/Context.S b/coroutine/amd64/Context.S index 056c276a31..fcc4b67bdc 100644 --- a/coroutine/amd64/Context.S +++ b/coroutine/amd64/Context.S @@ -5,6 +5,10 @@ ## Copyright, 2018, by Samuel Williams. ## +#if defined(__OpenBSD__) +#include <cet.h> +#endif + #define TOKEN_PASTE(x,y) x##y #define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name) @@ -13,6 +17,10 @@ .globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer) PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): +#if defined(__OpenBSD__) + _CET_ENDBR +#endif + # Make space on the stack for 6 registers: subq $48, %rsp |