]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/config/sh/lib1funcs.h
Update copyright years.
[thirdparty/gcc.git] / libgcc / config / sh / lib1funcs.h
CommitLineData
83ffe9cd 1/* Copyright (C) 1994-2023 Free Software Foundation, Inc.
3f1d3526
R
2
3This file is free software; you can redistribute it and/or modify it
4under the terms of the GNU General Public License as published by the
748086b7 5Free Software Foundation; either version 3, or (at your option) any
3f1d3526
R
6later version.
7
3f1d3526
R
8This file is distributed in the hope that it will be useful, but
9WITHOUT ANY WARRANTY; without even the implied warranty of
10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11General Public License for more details.
12
748086b7
JJ
13Under Section 7 of GPL version 3, you are granted additional
14permissions described in the GCC Runtime Library Exception, version
153.1, as published by the Free Software Foundation.
16
17You should have received a copy of the GNU General Public License and
18a copy of the GCC Runtime Library Exception along with this program;
19see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
20<http://www.gnu.org/licenses/>. */
3f1d3526
R
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
7a61cf6f
NC
43#if defined __SH2A__ && defined __FMOVD_ENABLED__
44#undef FMOVD_WORKS
3f1d3526
R
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__ */
31b6f0ae
R
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__ */