diff options
author | Andreas Jaeger <aj@suse.de> | 2002-08-31 08:06:48 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2002-08-31 08:06:48 +0000 |
commit | c816e074135d0de7dfd9e22e8e2bd4112736ae00 (patch) | |
tree | 652cb8d7611be3887b5b66e772e0e435a468650a /sysdeps/unix/sysv/linux/x86_64/setcontext.S | |
parent | ba1e2fe668361bd6887f237f70f47def96fa7bef (diff) | |
download | glibc-c816e074135d0de7dfd9e22e8e2bd4112736ae00.tar glibc-c816e074135d0de7dfd9e22e8e2bd4112736ae00.tar.gz glibc-c816e074135d0de7dfd9e22e8e2bd4112736ae00.tar.bz2 glibc-c816e074135d0de7dfd9e22e8e2bd4112736ae00.zip |
Update.
2002-08-31 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/x86_64/Makefile (sysdep_routines): Add
__start_context.
* sysdeps/unix/sysv/linux/x86_64/__start_context.S: New file.
* sysdeps/unix/sysv/linux/x86_64/makecontext.c: New file.
* sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: Add defines for
registers used for passing args.
* sysdeps/unix/sysv/linux/x86_64/swapcontext.S: Save and restore
all needed registers.
* sysdeps/unix/sysv/linux/x86_64/setcontext.S: Restore all
registers.
* sysdeps/unix/sysv/linux/x86_64/getcontext.S: Save all needed
registers.
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64/setcontext.S')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/setcontext.S | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/setcontext.S b/sysdeps/unix/sysv/linux/x86_64/setcontext.S index eb46034a50..e3d770bcc6 100644 --- a/sysdeps/unix/sysv/linux/x86_64/setcontext.S +++ b/sysdeps/unix/sysv/linux/x86_64/setcontext.S @@ -55,7 +55,8 @@ ENTRY(__setcontext) ldmxcsr oMXCSR(%rdi) - /* Load the new stack pointer and the preserved registers. */ + /* Load the new stack pointer, the preserved registers and + registers used for passing args. */ movq oRSP(%rdi), %rsp movq oRBX(%rdi), %rbx movq oRBP(%rdi), %rbp @@ -69,6 +70,15 @@ ENTRY(__setcontext) movq oRIP(%rdi), %rcx pushq %rcx + movq oRSI(%rdi), %rsi + movq oRDX(%rdi), %rdx + movq oRCX(%rdi), %rcx + movq oR8(%rdi), %r8 + movq oR9(%rdi), %r9 + + /* Setup finally %rdi. */ + movq oRDI(%rdi), %rdi + /* Clear rax to indicate success. */ xorq %rax, %rax |