Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .align 8
- .globl asm_yield
- asm_yield:
- pushq %rbp
- movq %rsp,%rbp
- cmpq $0,%rdi
- je thread_restore
- thread_save:
- movq %rsp,0(%rdi)
- movq %rbx,8(%rdi)
- movq %rdi,16(%rdi)
- movq %rsi,24(%rdi)
- movq %r12,32(%rdi)
- movq %r13,40(%rdi)
- movq %r14,48(%rdi)
- movq %r15,56(%rdi)
- thread_restore:
- movq 0(%rsi),%rsp
- movq 8(%rsi),%rbx
- movq 16(%rsi),%rdi
- movq 32(%rsi),%r12
- movq 40(%rsi),%r13
- movq 48(%rsi),%r14
- movq 56(%rsi),%r15
- movq 24(%rsi),%rsi
- popq %rbp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement