Reorder registers in other x86_64 assembler files

This fixes the previous commit which changed the register order in
swapcontext only, which caused setcontext to subtly corrupt the stack.
pull/13/head libucontext-0.1.3
A. Wilcox 2018-07-19 17:17:26 -05:00
parent 4f190cc561
commit 6046eb47e4
No known key found for this signature in database
GPG Key ID: CB29CB51922B9D14
2 changed files with 4 additions and 4 deletions

View File

@ -22,8 +22,8 @@ __getcontext:
movq %r14, 88(%rdi)
movq %r15, 96(%rdi)
movq %rdi, 104(%rdi)
movq %rbp, 112(%rdi)
movq %rsi, 120(%rdi)
movq %rsi, 112(%rdi)
movq %rbp, 120(%rdi)
movq %rbx, 128(%rdi)
movq %rdx, 136(%rdi)
movq $1, 144(%rdi) /* $1 is %rax */

View File

@ -21,8 +21,8 @@ __setcontext:
movq 80(%rdi), %r13
movq 88(%rdi), %r14
movq 96(%rdi), %r15
movq 112(%rdi), %rbp
movq 120(%rdi), %rsi
movq 112(%rdi), %rsi
movq 120(%rdi), %rbp
movq 128(%rdi), %rbx
movq 136(%rdi), %rdx
movq 144(%rdi), %rax