summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsamuel <samuel@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-20 10:17:00 +0000
committersamuel <samuel@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-20 10:17:00 +0000
commit83c84182ad03c79200765a43f6cc9b8d5b8abd33 (patch)
tree6c9e4eb0b14bd25079ccc0b3d715081a3698891b
parent9481461cc338d410e25163638af484c38317029e (diff)
Formatting changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--coroutine/amd64/Context.s10
-rw-r--r--coroutine/arm32/Context.s2
-rw-r--r--coroutine/arm64/Context.s2
-rw-r--r--coroutine/win32/Context.asm4
-rw-r--r--coroutine/win32/Context.h2
-rw-r--r--coroutine/win64/Context.asm4
-rw-r--r--coroutine/win64/Context.h2
7 files changed, 14 insertions, 12 deletions
diff --git a/coroutine/amd64/Context.s b/coroutine/amd64/Context.s
index e23f87d..0c42960 100644
--- a/coroutine/amd64/Context.s
+++ b/coroutine/amd64/Context.s
@@ -21,13 +21,13 @@ _coroutine_transfer:
pushq %r13
pushq %r14
pushq %r15
-
+
# Save caller stack pointer
movq %rsp, (%rdi)
-
+
# Restore callee stack pointer
movq (%rsi), %rsp
-
+
# Restore callee stack
popq %r15
popq %r14
@@ -35,9 +35,9 @@ _coroutine_transfer:
popq %r12
popq %rbx
popq %rbp
-
+
# Put the first argument into the return value
movq %rdi, %rax
-
+
# We pop the return address and jump to it
ret
diff --git a/coroutine/arm32/Context.s b/coroutine/arm32/Context.s
index 86a80f3..c2b93d0 100644
--- a/coroutine/arm32/Context.s
+++ b/coroutine/arm32/Context.s
@@ -11,4 +11,4 @@
coroutine_transfer:
stmia r1!, {r4-r11,sp,lr}
ldmia r0!, {r4-r11,sp,pc}
- bx lr \ No newline at end of file
+ bx lr
diff --git a/coroutine/arm64/Context.s b/coroutine/arm64/Context.s
index 2410dfc..f6e5f0a 100644
--- a/coroutine/arm64/Context.s
+++ b/coroutine/arm64/Context.s
@@ -7,8 +7,10 @@
.text
.align 2
+
.global coroutine_transfer
coroutine_transfer:
+
# Make space on the stack for caller registers
sub sp, sp, 0xb0
diff --git a/coroutine/win32/Context.asm b/coroutine/win32/Context.asm
index 8fa1383..4917faf 100644
--- a/coroutine/win32/Context.asm
+++ b/coroutine/win32/Context.asm
@@ -19,10 +19,10 @@
push ebx
push edi
push esi
-
+
; Save caller stack pointer
mov dword ptr [ecx], esp
-
+
; Restore callee stack pointer
mov esp, dword ptr [edx]
diff --git a/coroutine/win32/Context.h b/coroutine/win32/Context.h
index 1953646..cea0345 100644
--- a/coroutine/win32/Context.h
+++ b/coroutine/win32/Context.h
@@ -58,4 +58,4 @@ inline void coroutine_destroy(coroutine_context * context)
#if __cplusplus
}
-#endif \ No newline at end of file
+#endif
diff --git a/coroutine/win64/Context.asm b/coroutine/win64/Context.asm
index 6f64547..d699bd1 100644
--- a/coroutine/win64/Context.asm
+++ b/coroutine/win64/Context.asm
@@ -16,10 +16,10 @@ coroutine_transfer proc
push r13
push r14
push r15
-
+
; Save caller stack pointer
mov [rcx], rsp
-
+
; Restore callee stack pointer
mov rsp, [rdx]
diff --git a/coroutine/win64/Context.h b/coroutine/win64/Context.h
index 28173ba..ec2c0e8 100644
--- a/coroutine/win64/Context.h
+++ b/coroutine/win64/Context.h
@@ -58,4 +58,4 @@ inline void coroutine_destroy(coroutine_context * context)
#if __cplusplus
}
-#endif \ No newline at end of file
+#endif