1 /* Wrapper around mmap system call. 64 bit S/390 version.
2 Copyright (C) 2001 Free Software Foundation, Inc.
3 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
28 /* Save registers and setup stack frame. */
29 stmg %r6,%r15,48(%r15)
41 lg %r0,8(%r15) /* Load eos. */
42 aghi %r15,-208 /* Buy stack space. */
43 cfi_adjust_cfa_offset (208)
44 stg %r1,0(%r15) /* Store back chain. */
45 stg %r0,8(%r15) /* Store eos. */
47 /* Store parameters on stack, because old_mmap
48 takes only one parameter: a pointer to the parameter area. */
49 mvc 200(8,%r15),368(%r15) /* Move 'offset'. */
51 stg %r6,192(%r15) /* Store 'fd'. */
53 stg %r5,184(%r15) /* Store 'flags'. */
55 stg %r4,176(%r15) /* Store 'prot'. */
56 stg %r3,168(%r15) /* Store 'length'. */
57 stg %r2,160(%r15) /* Store 'start'. */
59 la %r2,160(%r15) /* Load address of parameter list. */
60 /* Do the system call trap. */
63 lg %r15,0(%r15) /* Load back chain. */
64 cfi_adjust_cfa_offset (-208)
65 lmg %r6,%r15,48(%r15) /* Load registers. */
67 /* Check gpr 2 for error. */
70 jgnl SYSCALL_ERROR_LABEL
72 /* Successful; return the syscall's value. */
77 weak_alias (__mmap, mmap)
78 weak_alias (__mmap, mmap64)
79 weak_alias (__mmap, __mmap64)