* config/xtensa/xtensa.c (call_insn_operand): Check
[official-gcc.git] / gcc / config / frv / frv-abi.h
blob089557ac0801e0032ffa43f3ff21e569bd57e2f5
1 /* Frv map GCC names to FR-V ABI.
2 Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc.
3 Contributed by Red Hat, Inc.
5 This file is part of GCC.
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 2, or (at your option)
10 any later version.
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.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* For each of the functions in the library that has a corresponding name in
23 the ABI, add an equivalence between the GCC name and the ABI name. This is
24 in a separate file from frv.h so that fp-bit.c can be made to include it. */
26 #ifdef __GNUC__
27 #ifdef __FRV_UNDERSCORE__
28 #define RENAME_LIBRARY(OLD,NEW) \
29 __asm__ (".globl\t_" #NEW "\n" \
30 "_" #NEW "=_" #OLD "\n" \
31 "\t.type\t_" #NEW ",@function\n");
33 #else
34 #define RENAME_LIBRARY(OLD,NEW) \
35 __asm__ (".globl\t" #NEW "\n" \
36 #NEW "=" #OLD "\n" \
37 "\t.type\t" #NEW ",@function\n");
38 #endif
40 #define CREATE_DOUBLE_SHIFT(OLD,NEW) \
41 __asm__ (".text\n" \
42 "\t.globl\t" #NEW "\n" \
43 "\t.type\t" #NEW ",@function\n" \
44 #NEW ":\n" \
45 "\tor\tgr11, gr0, gr10\n" \
46 ".L" #OLD " = " #OLD "\n" \
47 "\tbra\t.L" #OLD "\n");
49 #ifdef L_sf_to_df
50 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__extendsfdf2,__ftod)
51 #endif
53 #ifdef L_sf_to_si
54 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfsi,__ftoi)
55 #endif
57 #ifdef L_sf_to_usi
58 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui)
59 #endif
61 #ifdef L_df_to_si
62 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfsi,__dtoi)
63 #endif
65 #ifdef L_fixunssfsi
66 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui)
67 #endif
69 #ifdef L_fixunsdfsi
70 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfsi,__dtoui)
71 #endif
73 #ifdef L_fixsfdi
74 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfdi,__ftoll)
75 #endif
77 #ifdef L_fixdfdi
78 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfdi,__dtoll)
79 #endif
81 #ifdef L_fixunssfdi
82 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfdi,__ftoull)
83 #endif
85 #ifdef L_fixunsdfdi
86 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfdi,__dtoull)
87 #endif
89 #ifdef L_si_to_sf
90 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsisf,__itof)
91 #endif
93 #ifdef L_di_to_sf
94 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof)
95 #endif
97 #ifdef L_df_to_sf
98 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__truncdfsf2,__dtof)
99 #endif
101 #ifdef L_si_to_df
102 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsidf,__itod)
103 #endif
105 #ifdef L_floatdisf
106 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof)
107 #endif
109 #ifdef L_floatdidf
110 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdidf,__lltod)
111 #endif
113 #ifdef L_addsub_df
114 #define DECLARE_LIBRARY_RENAMES \
115 RENAME_LIBRARY(__adddf3,__addd)
116 RENAME_LIBRARY(__subdf3,__subd)
117 #endif
119 #ifdef L_mul_df
120 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__muldf3,__muld)
121 #endif
123 #ifdef L_div_df
124 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdf3,__divd)
125 #endif
127 #ifdef L_addsub_sf
128 #define DECLARE_LIBRARY_RENAMES \
129 RENAME_LIBRARY(__addsf3,__addf) \
130 RENAME_LIBRARY(__subsf3,__subf)
131 #endif
133 #ifdef L_mul_sf
134 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__mulsf3,__mulf)
135 #endif
137 #ifdef L_div_sf
138 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divsf3,__divf)
139 #endif
141 #ifdef L_ashldi3
142 #define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashldi3,__sllll)
143 #endif
145 #ifdef L_lshrdi3
146 #define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__lshrdi3,__srlll)
147 #endif
149 #ifdef L_ashrdi3
150 #define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashrdi3,__srall)
151 #endif
153 #ifdef L_adddi3
154 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__adddi3,__addll)
155 #endif
157 #ifdef L_subdi3
158 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__subdi3,__subll)
159 #endif
161 #ifdef L_muldi3
162 #define DECLARE_LIBRARY_RENAMES \
163 RENAME_LIBRARY(__muldi3,__mulll)
164 RENAME_LIBRARY(__muldi3,__umulll)
165 #endif
167 #ifdef L_divdi3
168 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdi3,__divll)
169 #endif
171 #ifdef L_udivdi3
172 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__udivdi3,__udivll)
173 #endif
175 #ifdef L_moddi3
176 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__moddi3,__modll)
177 #endif
179 #ifdef L_umoddi3
180 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__umoddi3,__umodll)
181 #endif
182 #endif /* __GNUC__ */