OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config/] [frv/] [frv-abi.h] - Blame information for rev 303

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 282 jeremybenn
/* Frv map GCC names to FR-V ABI.
2
   Copyright (C) 2000, 2003, 2004, 2007 Free Software Foundation, Inc.
3
   Contributed by Red Hat, Inc.
4
 
5
This file is part of GCC.
6
 
7
GCC is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 3, or (at your option)
10
any later version.
11
 
12
GCC is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
GNU General Public License for more details.
16
 
17
You should have received a copy of the GNU General Public License
18
along with GCC; see the file COPYING3.  If not see
19
<http://www.gnu.org/licenses/>.  */
20
 
21
/* For each of the functions in the library that has a corresponding name in
22
   the ABI, add an equivalence between the GCC name and the ABI name.  This is
23
   in a separate file from frv.h so that fp-bit.c can be made to include it.  */
24
 
25
#ifdef __GNUC__
26
#ifdef __FRV_UNDERSCORE__
27
#define RENAME_LIBRARY(OLD,NEW)                                         \
28
__asm__ (".globl\t_" #NEW "\n"                                          \
29
         "_" #NEW "=_" #OLD "\n"                                        \
30
         "\t.type\t_" #NEW ",@function\n");
31
 
32
#else
33
#define RENAME_LIBRARY(OLD,NEW)                                         \
34
__asm__ (".globl\t" #NEW "\n"                                           \
35
         #NEW "=" #OLD "\n"                                             \
36
         "\t.type\t" #NEW ",@function\n");
37
#endif
38
 
39
#define CREATE_DOUBLE_SHIFT(OLD,NEW)                                    \
40
__asm__ (".text\n"                                                      \
41
         "\t.globl\t" #NEW "\n"                                         \
42
         "\t.type\t" #NEW ",@function\n"                                \
43
         #NEW ":\n"                                                     \
44
         "\tor\tgr11, gr0, gr10\n"                                      \
45
         ".L" #OLD " = " #OLD "\n"                                      \
46
         "\tbra\t.L" #OLD "\n");
47
 
48
#ifdef L_sf_to_df
49
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__extendsfdf2,__ftod)
50
#endif
51
 
52
#ifdef L_sf_to_si
53
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfsi,__ftoi)
54
#endif
55
 
56
#ifdef L_sf_to_usi
57
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui)
58
#endif
59
 
60
#ifdef L_df_to_si
61
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfsi,__dtoi)
62
#endif
63
 
64
#ifdef L_fixunssfsi
65
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui)
66
#endif
67
 
68
#ifdef L_fixunsdfsi
69
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfsi,__dtoui)
70
#endif
71
 
72
#ifdef L_fixsfdi
73
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfdi,__ftoll)
74
#endif
75
 
76
#ifdef L_fixdfdi
77
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfdi,__dtoll)
78
#endif
79
 
80
#ifdef L_fixunssfdi
81
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfdi,__ftoull)
82
#endif
83
 
84
#ifdef L_fixunsdfdi
85
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfdi,__dtoull)
86
#endif
87
 
88
#ifdef L_si_to_sf
89
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsisf,__itof)
90
#endif
91
 
92
#ifdef L_di_to_sf
93
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof)
94
#endif
95
 
96
#ifdef L_df_to_sf
97
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__truncdfsf2,__dtof)
98
#endif
99
 
100
#ifdef L_si_to_df
101
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsidf,__itod)
102
#endif
103
 
104
#ifdef L_floatdisf
105
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof)
106
#endif
107
 
108
#ifdef L_floatdidf
109
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdidf,__lltod)
110
#endif
111
 
112
#ifdef L_addsub_df
113
#define DECLARE_LIBRARY_RENAMES \
114
        RENAME_LIBRARY(__adddf3,__addd)
115
        RENAME_LIBRARY(__subdf3,__subd)
116
#endif
117
 
118
#ifdef L_mul_df
119
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__muldf3,__muld)
120
#endif
121
 
122
#ifdef L_div_df
123
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdf3,__divd)
124
#endif
125
 
126
#ifdef L_addsub_sf
127
#define DECLARE_LIBRARY_RENAMES \
128
        RENAME_LIBRARY(__addsf3,__addf) \
129
        RENAME_LIBRARY(__subsf3,__subf)
130
#endif
131
 
132
#ifdef L_mul_sf
133
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__mulsf3,__mulf)
134
#endif
135
 
136
#ifdef L_div_sf
137
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divsf3,__divf)
138
#endif
139
 
140
#ifdef L_ashldi3
141
#define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashldi3,__sllll)
142
#endif
143
 
144
#ifdef L_lshrdi3
145
#define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__lshrdi3,__srlll)
146
#endif
147
 
148
#ifdef L_ashrdi3
149
#define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashrdi3,__srall)
150
#endif
151
 
152
#ifdef L_adddi3
153
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__adddi3,__addll)
154
#endif
155
 
156
#ifdef L_subdi3
157
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__subdi3,__subll)
158
#endif
159
 
160
#ifdef L_muldi3
161
#define DECLARE_LIBRARY_RENAMES \
162
        RENAME_LIBRARY(__muldi3,__mulll)
163
        RENAME_LIBRARY(__muldi3,__umulll)
164
#endif
165
 
166
#ifdef L_divdi3
167
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdi3,__divll)
168
#endif
169
 
170
#ifdef L_udivdi3
171
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__udivdi3,__udivll)
172
#endif
173
 
174
#ifdef L_moddi3
175
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__moddi3,__modll)
176
#endif
177
 
178
#ifdef L_umoddi3
179
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__umoddi3,__umodll)
180
#endif
181
#endif /* __GNUC__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.