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)
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. */
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");
34 #define RENAME_LIBRARY(OLD,NEW) \
35 __asm__ (".globl\t" #NEW "\n" \
37 "\t.type\t" #NEW ",@function\n");
40 #define CREATE_DOUBLE_SHIFT(OLD,NEW) \
42 "\t.globl\t" #NEW "\n" \
43 "\t.type\t" #NEW ",@function\n" \
45 "\tor\tgr11, gr0, gr10\n" \
46 ".L" #OLD " = " #OLD "\n" \
47 "\tbra\t.L" #OLD "\n");
50 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__extendsfdf2,__ftod)
54 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfsi,__ftoi)
58 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui)
62 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfsi,__dtoi)
66 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui)
70 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfsi,__dtoui)
74 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfdi,__ftoll)
78 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfdi,__dtoll)
82 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfdi,__ftoull)
86 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfdi,__dtoull)
90 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsisf,__itof)
94 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof)
98 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__truncdfsf2,__dtof)
102 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsidf,__itod)
106 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof)
110 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdidf,__lltod)
114 #define DECLARE_LIBRARY_RENAMES \
115 RENAME_LIBRARY(__adddf3,__addd)
116 RENAME_LIBRARY(__subdf3
,__subd
)
120 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__muldf3,__muld)
124 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdf3,__divd)
128 #define DECLARE_LIBRARY_RENAMES \
129 RENAME_LIBRARY(__addsf3,__addf) \
130 RENAME_LIBRARY(__subsf3,__subf)
134 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__mulsf3,__mulf)
138 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divsf3,__divf)
142 #define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashldi3,__sllll)
146 #define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__lshrdi3,__srlll)
150 #define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashrdi3,__srall)
154 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__adddi3,__addll)
158 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__subdi3,__subll)
162 #define DECLARE_LIBRARY_RENAMES \
163 RENAME_LIBRARY(__muldi3,__mulll)
164 RENAME_LIBRARY(__muldi3
,__umulll
)
168 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdi3,__divll)
172 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__udivdi3,__udivll)
176 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__moddi3,__modll)
180 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__umoddi3,__umodll)
182 #endif /* __GNUC__ */