@@ -132,43 +132,5 @@ void Coro_switchTo_(Coro *self, Coro *next) {
132132 coro_arm64_setcontext ((void * )to_context );
133133 }
134134
135- // No return statement needed - when resuming this coroutine later,
136- // execution will continue from this point
137-
138- /* *********************************************************************************
139- arm64_context_t *from_context = (arm64_context_t *)&self->env;
140- arm64_context_t *to_context = (arm64_context_t *)&next->env;
141-
142- // Combined save/restore in a single inline assembly block to ensure proper flow
143- asm volatile(
144- // Save current context
145- "stp x19, x20, [%[from], #0]\n" // Save x19, x20
146- "stp x21, x22, [%[from], #16]\n" // Save x21, x22
147- "stp x23, x24, [%[from], #32]\n" // Save x23, x24
148- "stp x25, x26, [%[from], #48]\n" // Save x25, x26
149- "stp x27, x28, [%[from], #64]\n" // Save x27, x28
150- "stp x29, x30, [%[from], #80]\n" // Save fp (x29), lr (x30)
151- "mov x16, sp\n" // Get current stack pointer
152- "str x16, [%[from], #96]\n" // Save stack pointer
153-
154- // Restore next context
155- "ldp x19, x20, [%[to], #0]\n" // Restore x19, x20
156- "ldp x21, x22, [%[to], #16]\n" // Restore x21, x22
157- "ldp x23, x24, [%[to], #32]\n" // Restore x23, x24
158- "ldp x25, x26, [%[to], #48]\n" // Restore x25, x26
159- "ldp x27, x28, [%[to], #64]\n" // Restore x27, x28
160- "ldp x29, x30, [%[to], #80]\n" // Restore fp (x29), lr (x30)
161- "ldr x16, [%[to], #96]\n" // Get new stack pointer
162- "mov sp, x16\n" // Restore stack pointer
163-
164- : // No outputs
165- : [from] "r" (from_context), [to] "r" (to_context) // Inputs
166- : "x16", "memory" // Clobbers
167- );
168-
169- // No return statement needed - when resuming this coroutine later,
170- // execution will continue from this point
171-
172- */
173135}
174136#endif
0 commit comments