summaryrefslogtreecommitdiff
path: root/coroutine
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-06-26 14:08:10 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-06-26 14:08:10 +0900
commit6df1814c08df93bbc0b3e7a73649bcf82e126064 (patch)
tree146eda02da4caa74b79fc9fc26c273bff468bdb5 /coroutine
parent51361272f9efca3eb0e1acb620ac62b576ddbb04 (diff)
coroutine/arm32/Context.S: save/restore the registers via stack
Retry of 518adcca0a and dbe232e24e
Diffstat (limited to 'coroutine')
-rw-r--r--coroutine/arm32/Context.S7
-rw-r--r--coroutine/arm32/Context.h2
2 files changed, 5 insertions, 4 deletions
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
{