mirror of
https://github.com/Tencent/libco.git
synced 2025-05-08 19:51:15 +08:00
Make stack sp aligned
This commit is contained in:
parent
c79e3e8869
commit
58651e99e8
@ -108,8 +108,8 @@ int coctx_make(coctx_t* ctx, coctx_pfn_t pfn, const void* s, const void* s1) {
|
||||
}
|
||||
#elif defined(__x86_64__)
|
||||
int coctx_make(coctx_t* ctx, coctx_pfn_t pfn, const void* s, const void* s1) {
|
||||
char* sp = ctx->ss_sp + ctx->ss_size;
|
||||
sp = (char*)((unsigned long)sp & -16LL) - sizeof(void*);
|
||||
char* sp = ctx->ss_sp + ctx->ss_size - sizeof(void*);
|
||||
sp = (char*)((unsigned long)sp & -16LL);
|
||||
|
||||
memset(ctx->regs, 0, sizeof(ctx->regs));
|
||||
void** ret_addr = (void**)(sp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user