diff options
author | Richard Henderson <rth@redhat.com> | 2004-01-16 05:04:59 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2004-01-16 05:04:59 +0000 |
commit | 33f0a6c75ee574bd376da63c6e88de98989d3373 (patch) | |
tree | 4ee2ad96ff7a8064515089c1349c7e202d10d3b4 /sysdeps/unix/sysv/linux/alpha/swapcontext.S | |
parent | 23e50ece453d94989cbb20c51c300f24386b08b2 (diff) | |
download | glibc-33f0a6c75ee574bd376da63c6e88de98989d3373.tar.gz glibc-33f0a6c75ee574bd376da63c6e88de98989d3373.tar.xz glibc-33f0a6c75ee574bd376da63c6e88de98989d3373.zip |
* sysdeps/unix/sysv/linux/alpha/Makefile [stdlib]: Process ucontext-offsets.sym. * sysdeps/unix/sysv/linux/alpha/getcontext.S: New file. * sysdeps/unix/sysv/linux/alpha/makecontext.S: New file. * sysdeps/unix/sysv/linux/alpha/setcontext.S: New file. * sysdeps/unix/sysv/linux/alpha/swapcontext.S: New file. * sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym: New file.
* sysdeps/unix/sysv/linux/alpha/Makefile [stdlib]: Process ucontext-offsets.sym. * sysdeps/unix/sysv/linux/alpha/getcontext.S: New file. * sysdeps/unix/sysv/linux/alpha/makecontext.S: New file. * sysdeps/unix/sysv/linux/alpha/setcontext.S: New file. * sysdeps/unix/sysv/linux/alpha/swapcontext.S: New file. * sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym: New file. 2004-01-15 Richard Henderson <rth@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/alpha/swapcontext.S')
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/swapcontext.S | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/swapcontext.S b/sysdeps/unix/sysv/linux/alpha/swapcontext.S new file mode 100644 index 0000000000..5f6615e0b6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/swapcontext.S @@ -0,0 +1,51 @@ +/* Save current context and install the given one. + Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <sysdep.h> +#include <ucontext-offsets.h> + +ENTRY(__swapcontext) + +#ifdef PROF + ldgp $29, 0($27) + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at + .prologue 1 +#elif defined PIC + .prologue 0 +#else + ldgp $29, 0($27) + .prologue 1 +#endif + +#ifdef PIC + unop + bsr $0, __getcontext_x !samegp + mov $17, $16 + br $31, __setcontext !samegp +#else + jsr $0, __getcontext_x + mov $17, $16 + jmp $31, __setcontext +#endif + +END(__swapcontext) +weak_alias(__swapcontext, swapcontext) |