mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Formatting changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9481461cc3
commit
83c84182ad
7 changed files with 14 additions and 12 deletions
|
@ -21,13 +21,13 @@ _coroutine_transfer:
|
||||||
pushq %r13
|
pushq %r13
|
||||||
pushq %r14
|
pushq %r14
|
||||||
pushq %r15
|
pushq %r15
|
||||||
|
|
||||||
# Save caller stack pointer
|
# Save caller stack pointer
|
||||||
movq %rsp, (%rdi)
|
movq %rsp, (%rdi)
|
||||||
|
|
||||||
# Restore callee stack pointer
|
# Restore callee stack pointer
|
||||||
movq (%rsi), %rsp
|
movq (%rsi), %rsp
|
||||||
|
|
||||||
# Restore callee stack
|
# Restore callee stack
|
||||||
popq %r15
|
popq %r15
|
||||||
popq %r14
|
popq %r14
|
||||||
|
@ -35,9 +35,9 @@ _coroutine_transfer:
|
||||||
popq %r12
|
popq %r12
|
||||||
popq %rbx
|
popq %rbx
|
||||||
popq %rbp
|
popq %rbp
|
||||||
|
|
||||||
# Put the first argument into the return value
|
# Put the first argument into the return value
|
||||||
movq %rdi, %rax
|
movq %rdi, %rax
|
||||||
|
|
||||||
# We pop the return address and jump to it
|
# We pop the return address and jump to it
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -11,4 +11,4 @@
|
||||||
coroutine_transfer:
|
coroutine_transfer:
|
||||||
stmia r1!, {r4-r11,sp,lr}
|
stmia r1!, {r4-r11,sp,lr}
|
||||||
ldmia r0!, {r4-r11,sp,pc}
|
ldmia r0!, {r4-r11,sp,pc}
|
||||||
bx lr
|
bx lr
|
||||||
|
|
|
@ -7,8 +7,10 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
.align 2
|
.align 2
|
||||||
|
|
||||||
.global coroutine_transfer
|
.global coroutine_transfer
|
||||||
coroutine_transfer:
|
coroutine_transfer:
|
||||||
|
|
||||||
# Make space on the stack for caller registers
|
# Make space on the stack for caller registers
|
||||||
sub sp, sp, 0xb0
|
sub sp, sp, 0xb0
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
push ebx
|
push ebx
|
||||||
push edi
|
push edi
|
||||||
push esi
|
push esi
|
||||||
|
|
||||||
; Save caller stack pointer
|
; Save caller stack pointer
|
||||||
mov dword ptr [ecx], esp
|
mov dword ptr [ecx], esp
|
||||||
|
|
||||||
; Restore callee stack pointer
|
; Restore callee stack pointer
|
||||||
mov esp, dword ptr [edx]
|
mov esp, dword ptr [edx]
|
||||||
|
|
||||||
|
|
|
@ -58,4 +58,4 @@ inline void coroutine_destroy(coroutine_context * context)
|
||||||
|
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,10 +16,10 @@ coroutine_transfer proc
|
||||||
push r13
|
push r13
|
||||||
push r14
|
push r14
|
||||||
push r15
|
push r15
|
||||||
|
|
||||||
; Save caller stack pointer
|
; Save caller stack pointer
|
||||||
mov [rcx], rsp
|
mov [rcx], rsp
|
||||||
|
|
||||||
; Restore callee stack pointer
|
; Restore callee stack pointer
|
||||||
mov rsp, [rdx]
|
mov rsp, [rdx]
|
||||||
|
|
||||||
|
|
|
@ -58,4 +58,4 @@ inline void coroutine_destroy(coroutine_context * context)
|
||||||
|
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue