OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgcc/] [config/] [frv/] [frv-abi.h] - Blame information for rev 734

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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