(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / unix / mips / sysdep.h
blob714830147d2e7f411e8f289707eef264e52263b4
1 /* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003, 2004
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 <sgidefs.h>
22 #include <sysdeps/unix/sysdep.h>
24 #ifdef __ASSEMBLER__
26 #include <regdef.h>
28 #define ENTRY(name) \
29 .globl name; \
30 .align 2; \
31 .ent name,0; \
32 name##:
34 #undef END
35 #define END(function) \
36 .end function; \
37 .size function,.-function
39 #define ret j ra ; nop
41 #undef PSEUDO_END
42 #define PSEUDO_END(sym) .end sym; .size sym,.-sym
44 #define PSEUDO_NOERRNO(name, syscall_name, args) \
45 .align 2; \
46 ENTRY(name) \
47 .set noreorder; \
48 li v0, SYS_ify(syscall_name); \
49 syscall
51 #undef PSEUDO_END_NOERRNO
52 #define PSEUDO_END_NOERRNO(sym) .end sym; .size sym,.-sym
54 #define ret_NOERRNO ret
56 #define PSEUDO_ERRVAL(name, syscall_name, args) \
57 .align 2; \
58 ENTRY(name) \
59 .set noreorder; \
60 li v0, SYS_ify(syscall_name); \
61 syscall
63 #undef PSEUDO_END_ERRVAL
64 #define PSEUDO_END_ERRVAL(sym) .end sym; .size sym,.-sym
66 #define ret_ERRVAL ret
68 #define r0 v0
69 #define r1 v1
70 /* The mips move insn is d,s. */
71 #define MOVE(x,y) move y , x
73 #if _MIPS_SIM == _ABIO32
74 # define L(label) $L ## label
75 #else
76 # define L(label) .L ## label
77 #endif
79 #endif