sparc64: Remove unwind information from signal return stubs [BZ#31244]
[glibc.git] / sysdeps / unix / mips / sysdep.h
blobd1e0460260cd4d62f0cad7525d96570c13a720b2
1 /* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <https://www.gnu.org/licenses/>. */
18 #include <sgidefs.h>
19 #include <sysdeps/unix/sysdep.h>
21 #ifndef __mips_isa_rev
22 # define __mips_isa_rev 0
23 #endif
25 #ifdef __ASSEMBLER__
27 #include <regdef.h>
29 #define ENTRY(name) \
30 .globl name; \
31 .align 2; \
32 .ent name,0; \
33 name##: \
34 cfi_startproc;
36 #undef END
37 #define END(function) \
38 cfi_endproc; \
39 .end function; \
40 .size function,.-function
42 #define ret j ra ; nop
44 #undef PSEUDO_END
45 #define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym
47 #define PSEUDO_NOERRNO(name, syscall_name, args) \
48 .align 2; \
49 ENTRY(name) \
50 .set nomips16; \
51 .set noreorder; \
52 li v0, SYS_ify(syscall_name); \
53 syscall
55 #undef PSEUDO_END_NOERRNO
56 #define PSEUDO_END_NOERRNO(sym) cfi_endproc; .end sym; .size sym,.-sym
58 #define ret_NOERRNO ret
60 #define PSEUDO_ERRVAL(name, syscall_name, args) \
61 .align 2; \
62 ENTRY(name) \
63 .set nomips16; \
64 .set noreorder; \
65 li v0, SYS_ify(syscall_name); \
66 syscall
68 #undef PSEUDO_END_ERRVAL
69 #define PSEUDO_END_ERRVAL(sym) cfi_endproc; .end sym; .size sym,.-sym
71 #define ret_ERRVAL ret
73 #define r0 v0
74 #define r1 v1
75 /* The mips move insn is d,s. */
76 #define MOVE(x,y) move y , x
78 #if _MIPS_SIM == _ABIO32
79 # define L(label) $L ## label
80 #else
81 # define L(label) .L ## label
82 #endif
84 #endif