diff options
Diffstat (limited to 'coroutine/amd64')
| -rw-r--r-- | coroutine/amd64/Context.S | 8 | ||||
| -rw-r--r-- | coroutine/amd64/Context.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/coroutine/amd64/Context.S b/coroutine/amd64/Context.S index fad59ecdda..4b94d31f30 100644 --- a/coroutine/amd64/Context.S +++ b/coroutine/amd64/Context.S @@ -10,12 +10,11 @@ * one at the bottom of this file */ #define TOKEN_PASTE(x,y) x##y -#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name) .text -.globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer) -PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): +.globl PREFIXED_SYMBOL(coroutine_transfer) +PREFIXED_SYMBOL(coroutine_transfer): #if defined(__CET__) && (__CET__ & 0x01) != 0 /* IBT landing pad */ @@ -60,6 +59,8 @@ PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): .section .note.GNU-stack,"",%progbits #endif +#if defined(__ELF__) + #if defined(__CET__) && (__CET__ & 0x01) != 0 # define IBT_FLAG 0x01 #else @@ -84,3 +85,4 @@ PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): .long 0x0 /* 8-byte alignment padding */ /* End descriptor */ .popsection +#endif diff --git a/coroutine/amd64/Context.h b/coroutine/amd64/Context.h index 44daa4e01a..65aa638304 100644 --- a/coroutine/amd64/Context.h +++ b/coroutine/amd64/Context.h @@ -69,7 +69,7 @@ static inline void coroutine_initialize( context->stack_pointer = (void**)((uintptr_t)top & ~0xF); *--context->stack_pointer = NULL; - *--context->stack_pointer = (void*)start; + *--context->stack_pointer = (void*)(uintptr_t)start; context->stack_pointer -= COROUTINE_REGISTERS; memset(context->stack_pointer, 0, sizeof(void*) * COROUTINE_REGISTERS); |
