1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Restore updated implementation of arm32 coroutine code, but prefer ucontext.

This commit is contained in:
Samuel Williams 2019-06-26 22:02:19 +12:00
parent ba17127e99
commit acb67472c7
3 changed files with 15 additions and 4 deletions

View file

@ -9,6 +9,14 @@
.globl coroutine_transfer
coroutine_transfer:
stmia r1!, {r4-r11,sp,lr}
ldmia r0!, {r4-r11,sp,pc}
bx lr
# Save caller state (8 registers + return address)
push {r4-r11,lr}
# Save caller stack pointer
str sp, [r0]
# Restore callee stack pointer
ldr sp, [r1]
# Restore callee state (8 registers program counter)
pop {r4-r11,pc}