]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/alpha/llseek.S
Remove a.out.h.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / alpha / llseek.S
1 /* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
19
20 /* For compatibility only: a "long" is 64 bits on the Alpha, so
21 llseek() isn't really needed. But there are some programs out
22 there who may depend on it being around. */
23
24 #include <sysdep.h>
25
26 .text
27 ENTRY(llseek)
28 #ifdef PROF
29 ldgp gp, 0(pv)
30 .set noat
31 lda AT, _mcount
32 jsr AT, (AT), _mcount
33 .set at
34 .prologue 1
35 #else
36 .prologue 0
37 #endif
38
39 sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */
40 zap a2, 0xf0, a2
41 mov a3, t0 /* save result address */
42 bis a2, a1, a1
43
44 mov a4, a2 /* shift down whence */
45
46 ldi v0, __NR_lseek
47 call_pal PAL_callsys
48 bne a3, error
49
50 stq v0, 0(t0)
51 ret
52
53 error:
54 #ifndef PROF
55 br gp, 1f
56 1: ldgp gp, 0(gp)
57 #endif
58 jmp zero, __syscall_error
59
60 END(llseek)