1#ifndef COROUTINE_PPC64LE_CONTEXT_H
2#define COROUTINE_PPC64LE_CONTEXT_H 1
11#define COROUTINE __attribute__((noreturn)) void
28 context->stack_pointer = NULL;
31static inline void coroutine_initialize(
33 coroutine_start start,
37 assert(start && stack && size >= 1024);
40 char * top = (
char*)stack + size;
41 context->stack_pointer = (
void**)((uintptr_t)top & ~0xF);
43 context->stack_pointer -= COROUTINE_REGISTERS;
44 memset(context->stack_pointer, 0,
sizeof(
void*) * COROUTINE_REGISTERS);
47 context->stack_pointer[18] = ((
char*)start) + 8;
54 context->stack_pointer = NULL;