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