]> git.ipfire.org Git - thirdparty/glibc.git/blob - ports/sysdeps/mips/include/sys/asm.h
Update copyright notices with scripts/update-copyrights
[thirdparty/glibc.git] / ports / sysdeps / mips / include / sys / asm.h
1 /* Copyright (C) 2013-2014 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
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.
8
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.
13
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 <http://www.gnu.org/licenses/>. */
17
18 #ifndef _SYS_ASM_H
19
20 # include_next <sys/asm.h>
21
22 # undef __mips_cfi_startproc
23 # define __mips_cfi_startproc cfi_startproc
24 # undef __mips_cfi_endproc
25 # define __mips_cfi_endproc cfi_endproc
26
27 # if _MIPS_SIM == _ABIO32
28 # define SETUP_GP64_REG_CFI(a)
29 # define SETUP_GP64_REG(a, b)
30 # define SETUP_GP64_STACK_CFI(a)
31 # define SETUP_GP64_STACK(a, b)
32 # define RESTORE_GP64_REG
33 # define RESTORE_GP64_STACK
34 # else
35 # define SETUP_GP64_REG_CFI(gpsavereg) \
36 cfi_register (gp, gpsavereg)
37 # define SETUP_GP64_REG(gpsavereg, proc) \
38 SETUP_GP64 (gpsavereg, proc); \
39 SETUP_GP64_REG_CFI (gpsavereg)
40 # define SETUP_GP64_STACK_CFI(gpoffset) \
41 cfi_rel_offset (gp, gpoffset)
42 # define SETUP_GP64_STACK(gpoffset, proc) \
43 SETUP_GP64 (gpoffset, proc); \
44 SETUP_GP64_STACK_CFI (gpoffset)
45 # define RESTORE_GP64_REG \
46 RESTORE_GP64; \
47 cfi_restore (gp)
48 # define RESTORE_GP64_STACK \
49 RESTORE_GP64; \
50 cfi_restore (gp)
51 # endif
52
53 #endif