summaryrefslogtreecommitdiff
path: root/coroutine/ppc64/Context.h
diff options
context:
space:
mode:
Diffstat (limited to 'coroutine/ppc64/Context.h')
-rw-r--r--coroutine/ppc64/Context.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/coroutine/ppc64/Context.h b/coroutine/ppc64/Context.h
index 5b47511b9c..085b475ed5 100644
--- a/coroutine/ppc64/Context.h
+++ b/coroutine/ppc64/Context.h
@@ -12,7 +12,7 @@
enum {
COROUTINE_REGISTERS =
- 19 /* 18 general purpose registers (r14–r31) and 1 return address */
+ 20 /* 19 general purpose registers (r13-r31) and 1 return address */
+ 4 /* space for fiber_entry() to store the link register */
};
@@ -44,7 +44,7 @@ static inline void coroutine_initialize(
memset(context->stack_pointer, 0, sizeof(void*) * COROUTINE_REGISTERS);
/* Skip a global prologue that sets the TOC register */
- context->stack_pointer[18] = ((char*)start) + 8;
+ context->stack_pointer[19] = ((char*)start) + 8;
}
struct coroutine_context * coroutine_transfer(struct coroutine_context * current, struct coroutine_context * target);