1#ifndef COROUTINE_PPC64LE_CONTEXT_H
2#define COROUTINE_PPC64LE_CONTEXT_H 1
11#define COROUTINE __attribute__((noreturn)) void
30 context->stack_pointer = NULL;
33static inline void coroutine_initialize(
35 coroutine_start start,
39 assert(start && stack && size >= 1024);
42 char * top = (
char*)stack + size;
43 context->stack_pointer = (
void**)((uintptr_t)top & ~0xF);
45 context->stack_pointer -= COROUTINE_REGISTERS;
46 memset(context->stack_pointer, 0,
sizeof(
void*) * COROUTINE_REGISTERS);
49 context->stack_pointer[18] = ((
char*)start) + 8;
56 context->stack_pointer = NULL;