* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
[glibc.git] / sysdeps / unix / mips / sysdep.h
blob9302710efac66b34f74eac9767a9fde79806dc4a
1 /* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
2 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Brendan Kehoe (brendan@zen.org).
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
19 02111-1307 USA. */
21 #include <sysdeps/unix/sysdep.h>
23 #ifdef __ASSEMBLER__
25 #include <regdef.h>
27 #define ENTRY(name) \
28 .globl name; \
29 .align 2; \
30 .ent name,0; \
31 name##:
33 #undef END
34 #define END(function) \
35 .end function; \
36 .size function,.-function
38 #define ret j ra ; nop
40 #undef PSEUDO_END
41 #define PSEUDO_END(sym) .end sym; .size sym,.-sym
43 #define PSEUDO_NOERRNO(name, syscall_name, args) \
44 .align 2; \
45 ENTRY(name) \
46 .set noreorder; \
47 li v0, SYS_ify(syscall_name); \
48 syscall
50 #undef PSEUDO_END_NOERRNO
51 #define PSEUDO_END_NOERRNO(sym) .end sym; .size sym,.-sym
53 #define ret_NOERRNO ret
55 #define PSEUDO_ERRVAL(name, syscall_name, args) \
56 .align 2; \
57 ENTRY(name) \
58 .set noreorder; \
59 li v0, SYS_ify(syscall_name); \
60 syscall
62 #undef PSEUDO_END_ERRVAL
63 #define PSEUDO_END_ERRVAL(sym) .end sym; .size sym,.-sym
65 #define ret_ERRVAL ret
67 #define r0 v0
68 #define r1 v1
69 /* The mips move insn is d,s. */
70 #define MOVE(x,y) move y , x
72 #if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_ABIO64
73 # define L(label) $L ## label
74 #else
75 # define L(label) .L ## label
76 #endif
78 #endif