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

coroutine/arm32/Context.S: save/restore the registers via stack

Retry of 518adcca0a and dbe232e24e
This commit is contained in:
Yusuke Endoh 2019-06-26 14:08:10 +09:00
parent 51361272f9
commit 6df1814c08
3 changed files with 8 additions and 4 deletions

View file

@ -2272,6 +2272,9 @@ AS_CASE(["$rb_cv_fiber_coroutine"], [yes|''], [
[x64-mingw32], [
rb_cv_fiber_coroutine=win64
],
[armv7*-linux-*], [
rb_cv_fiber_coroutine=arm32
],
[aarch64-linux], [
rb_cv_fiber_coroutine=arm64
],

View file

@ -9,6 +9,7 @@
.globl coroutine_transfer
coroutine_transfer:
stmia r1!, {r4-r11,sp,lr}
ldmia r0!, {r4-r11,sp,pc}
bx lr
push {r4-r11,lr}
str sp, [r0]
ldr sp, [r1]
pop {r4-r11,pc}

View file

@ -16,7 +16,7 @@ extern "C" {
#define COROUTINE __attribute__((noreturn)) void
enum {COROUTINE_REGISTERS = 9};
enum {COROUTINE_REGISTERS = 8};
typedef struct
{