From 6df1814c08df93bbc0b3e7a73649bcf82e126064 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Wed, 26 Jun 2019 14:08:10 +0900 Subject: coroutine/arm32/Context.S: save/restore the registers via stack Retry of 518adcca0a and dbe232e24e --- configure.ac | 3 +++ coroutine/arm32/Context.S | 7 ++++--- coroutine/arm32/Context.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5f2fe6b6c1..8c431ad70b 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ], diff --git a/coroutine/arm32/Context.S b/coroutine/arm32/Context.S index c2b93d0a34..a44ba48778 100644 --- a/coroutine/arm32/Context.S +++ b/coroutine/arm32/Context.S @@ -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} diff --git a/coroutine/arm32/Context.h b/coroutine/arm32/Context.h index d2bb582be6..8105bd2cff 100644 --- a/coroutine/arm32/Context.h +++ b/coroutine/arm32/Context.h @@ -16,7 +16,7 @@ extern "C" { #define COROUTINE __attribute__((noreturn)) void -enum {COROUTINE_REGISTERS = 9}; +enum {COROUTINE_REGISTERS = 8}; typedef struct { -- cgit v1.2.3