]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgcc/config/sh/lib1funcs.h
Update copyright years.
[thirdparty/gcc.git] / libgcc / config / sh / lib1funcs.h
1 /* Copyright (C) 1994-2018 Free Software Foundation, Inc.
2
3 This file is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 3, or (at your option) any
6 later version.
7
8 This file is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 Under Section 7 of GPL version 3, you are granted additional
14 permissions described in the GCC Runtime Library Exception, version
15 3.1, as published by the Free Software Foundation.
16
17 You should have received a copy of the GNU General Public License and
18 a copy of the GCC Runtime Library Exception along with this program;
19 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
20 <http://www.gnu.org/licenses/>. */
21
22 #ifdef __ELF__
23 #define LOCAL(X) .L_##X
24 #define FUNC(X) .type X,@function
25 #define HIDDEN_FUNC(X) FUNC(X); .hidden X
26 #define HIDDEN_ALIAS(X,Y) ALIAS (X,Y); .hidden GLOBAL(X)
27 #define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
28 #define ENDFUNC(X) ENDFUNC0(X)
29 #else
30 #define LOCAL(X) L_##X
31 #define FUNC(X)
32 #define HIDDEN_FUNC(X)
33 #define HIDDEN_ALIAS(X,Y) ALIAS (X,Y)
34 #define ENDFUNC(X)
35 #endif
36
37 #define CONCAT(A,B) A##B
38 #define GLOBAL0(U,X) CONCAT(U,__##X)
39 #define GLOBAL(X) GLOBAL0(__USER_LABEL_PREFIX__,X)
40
41 #define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y)
42
43 #if defined __SH2A__ && defined __FMOVD_ENABLED__
44 #undef FMOVD_WORKS
45 #define FMOVD_WORKS
46 #endif
47
48 #ifdef __LITTLE_ENDIAN__
49 #define DR00 fr1
50 #define DR01 fr0
51 #define DR20 fr3
52 #define DR21 fr2
53 #define DR40 fr5
54 #define DR41 fr4
55 #else /* !__LITTLE_ENDIAN__ */
56 #define DR00 fr0
57 #define DR01 fr1
58 #define DR20 fr2
59 #define DR21 fr3
60 #define DR40 fr4
61 #define DR41 fr5
62 #endif /* !__LITTLE_ENDIAN__ */
63
64 #ifdef __sh1__
65 #define SL(branch, dest, in_slot, in_slot_arg2) \
66 in_slot, in_slot_arg2; branch dest
67 #define SL1(branch, dest, in_slot) \
68 in_slot; branch dest
69 #else /* ! __sh1__ */
70 #define SL(branch, dest, in_slot, in_slot_arg2) \
71 branch##.s dest; in_slot, in_slot_arg2
72 #define SL1(branch, dest, in_slot) \
73 branch##/s dest; in_slot
74 #endif /* !__sh1__ */