Update copyright dates with scripts/update-copyrights.
[glibc.git] / sysdeps / unix / sysv / linux / i386 / call_sync_file_range.S
blob02c2048671a384c26dcd7b312ce49745c393e8ce
1 /* Selective file content synch'ing.
2    Copyright (C) 2006-2015 Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
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    Lesser General Public License for more details.
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library; if not, see
17    <http://www.gnu.org/licenses/>.  */
19 #include <sysdep.h>
20 #define _ERRNO_H        1
21 #include <bits/errno.h>
24         .text
25 ENTRY (__call_sync_file_range)
26 #ifdef __NR_sync_file_range
27         pushl   %ebx
28         cfi_adjust_cfa_offset (4)
29         pushl   %esi
30         cfi_adjust_cfa_offset (4)
31         pushl   %edi
32         cfi_adjust_cfa_offset (4)
33         pushl   %ebp
34         cfi_adjust_cfa_offset (4)
36         movl    20(%esp), %ebx
37         cfi_rel_offset (ebx, 12)
38         movl    24(%esp), %ecx
39         movl    28(%esp), %edx
40         movl    32(%esp), %esi
41         cfi_rel_offset (esi, 8)
42         movl    36(%esp), %edi
43         cfi_rel_offset (edi, 4)
44         movl    40(%esp), %ebp
45         cfi_rel_offset (ebp, 0)
47         movl    $SYS_ify(sync_file_range), %eax
48         ENTER_KERNEL
50         popl    %ebp
51         cfi_adjust_cfa_offset (-4)
52         cfi_restore (ebp)
53         popl    %edi
54         cfi_adjust_cfa_offset (-4)
55         cfi_restore (edi)
56         popl    %esi
57         cfi_adjust_cfa_offset (-4)
58         cfi_restore (esi)
59         popl    %ebx
60         cfi_adjust_cfa_offset (-4)
61         cfi_restore (ebx)
63         cmpl    $-4095, %eax
64         jae     SYSCALL_ERROR_LABEL
65 #else
66         movl    $-ENOSYS, %eax
67         jmp     SYSCALL_ERROR_LABEL
68 #endif
69         ret
70 PSEUDO_END (__call_sync_file_range)