Move shared umount.c from hppa to mips.
[jlayton/glibc.git] / ports / sysdeps / unix / sysv / linux / mips / mips32 / mips16 / mips16-syscall.h
1 /* MIPS16 syscall wrappers.
2    Copyright (C) 2013-2014 Free Software Foundation, Inc.
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
7    License as published by the Free Software Foundation; either
8    version 2.1 of the 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 #ifndef MIPS16_SYSCALL_H
20 #define MIPS16_SYSCALL_H 1
21
22 #define __nomips16 __attribute__ ((nomips16))
23
24 union __mips16_syscall_return
25   {
26     long long val;
27     struct
28       {
29         long v0;
30         long v1;
31       }
32     reg;
33   };
34
35 long long __nomips16 __mips16_syscall0 (long number);
36 #define __mips16_syscall0(dummy, number)                                \
37         __mips16_syscall0 ((long) (number))
38
39 long long __nomips16 __mips16_syscall1 (long a0,
40                                         long number);
41 #define __mips16_syscall1(a0, number)                                   \
42         __mips16_syscall1 ((long) (a0),                                 \
43                            (long) (number))
44
45 long long __nomips16 __mips16_syscall2 (long a0, long a1,
46                                         long number);
47 #define __mips16_syscall2(a0, a1, number)                               \
48         __mips16_syscall2 ((long) (a0), (long) (a1),                    \
49                            (long) (number))
50
51 long long __nomips16 __mips16_syscall3 (long a0, long a1, long a2,
52                                         long number);
53 #define __mips16_syscall3(a0, a1, a2, number)                           \
54         __mips16_syscall3 ((long) (a0), (long) (a1), (long) (a2),       \
55                            (long) (number))
56
57 long long __nomips16 __mips16_syscall4 (long a0, long a1, long a2, long a3,
58                                         long number);
59 #define __mips16_syscall4(a0, a1, a2, a3, number)                       \
60         __mips16_syscall4 ((long) (a0), (long) (a1), (long) (a2),       \
61                            (long) (a3),                                 \
62                            (long) (number))
63
64 long long __nomips16 __mips16_syscall5 (long a0, long a1, long a2, long a3,
65                                         long a4,
66                                         long number);
67 #define __mips16_syscall5(a0, a1, a2, a3, a4, number)                   \
68         __mips16_syscall5 ((long) (a0), (long) (a1), (long) (a2),       \
69                            (long) (a3), (long) (a4),                    \
70                            (long) (number))
71
72 long long __nomips16 __mips16_syscall6 (long a0, long a1, long a2, long a3,
73                                         long a4, long a5,
74                                         long number);
75 #define __mips16_syscall6(a0, a1, a2, a3, a4, a5, number)               \
76         __mips16_syscall6 ((long) (a0), (long) (a1), (long) (a2),       \
77                            (long) (a3), (long) (a4), (long) (a5),       \
78                            (long) (number))
79
80 long long __nomips16 __mips16_syscall7 (long a0, long a1, long a2, long a3,
81                                         long a4, long a5, long a6,
82                                         long number);
83 #define __mips16_syscall7(a0, a1, a2, a3, a4, a5, a6, number)           \
84         __mips16_syscall7 ((long) (a0), (long) (a1), (long) (a2),       \
85                            (long) (a3), (long) (a4), (long) (a5),       \
86                            (long) (a6),                                 \
87                            (long) (number))
88
89 #endif