summaryrefslogtreecommitdiff
path: root/coroutine/ppc64/Context.h
diff options
context:
space:
mode:
authorSergey Fedorov <vital.had@gmail.com>2022-10-19 18:49:45 +0800
committerGitHub <noreply@github.com>2022-10-19 23:49:45 +1300
commit567725ed303b6738493c80efaf93dc4c1e65a9c9 (patch)
tree75f141047050eee63c05d613491595a7a9380afa /coroutine/ppc64/Context.h
parentfc3137ef54562c3c3290245c0f62e0bb193c3145 (diff)
downloadruby-567725ed303b6738493c80efaf93dc4c1e65a9c9.tar.gz
Fix and improve coroutines for Darwin (macOS) ppc/ppc64. (#5975)
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..3e6f77f55a 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);