]>
Commit | Line | Data |
---|---|---|
b168057a | 1 | /* Copyright (C) 2009-2015 Free Software Foundation, Inc. |
7756ba9d DH |
2 | |
3 | This file is part of the GNU C Library. | |
4 | ||
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 License as | |
7 | published by the Free Software Foundation; either version 2.1 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 | Lesser General Public License for more details. | |
14 | ||
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/>. */ | |
18 | ||
19 | #include <sysdep.h> | |
20 | ||
21 | #define EINVAL 22 | |
22 | .text | |
23 | ENTRY (__mmap) | |
24 | addik r3,r0,-EINVAL | |
25 | andi r4,r10,0xfff | |
26 | bnei r4,L(skip) | |
27 | addik r12,r0,SYS_ify(mmap2) | |
28 | sra r10,r10 | |
29 | sra r10,r10 | |
30 | sra r10,r10 | |
31 | sra r10,r10 | |
32 | sra r10,r10 | |
33 | sra r10,r10 | |
34 | sra r10,r10 | |
35 | sra r10,r10 | |
36 | sra r10,r10 | |
37 | sra r10,r10 | |
38 | sra r10,r10 | |
39 | sra r10,r10 ; /* mmap2 takes the offset in pages. */ | |
40 | brki r14,8 | |
41 | nop | |
42 | L(skip): | |
43 | addik r4,r0,-4095 | |
44 | cmpu r4,r4,r3 | |
45 | bgei r4,SYSCALL_ERROR_LABEL | |
46 | rtsd r15,8 | |
47 | nop | |
48 | PSEUDO_END (__mmap) | |
49 | ||
50 | weak_alias (__mmap, mmap) |