Import pre-release gcc-5.0 to new vendor branch
[dragonfly.git] / contrib / gcc-5.0 / libgcc / config / arc / dp-hack.h
1 /* Copyright (C) 2007-2015 Free Software Foundation, Inc.
2    Contributor: Joern Rennecke <joern.rennecke@embecosm.com>
3                 on behalf of Synopsys Inc.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
20
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
24 <http://www.gnu.org/licenses/>.  */
25
26 /* This file selects the double-precision parts of fp-bit.c that are
27    still needed for some ARC hardware variants; it also renames functions
28    that duplicate asm-coded functionality so that their results can be
29    used to compare with the optimized versions for debugging.  */
30
31 #define FINE_GRAINED_LIBRARIES
32 #define ARC_DP_DEBUG 1
33 #if !defined (__ARC_NORM__) || ARC_DP_DEBUG
34 #define L_pack_df
35 #define L_unpack_df
36 #define L_make_df
37 #define L_thenan_df
38 #define L_sf_to_df
39 #endif
40 #ifndef __ARC_NORM__
41 #define L_addsub_df
42 #elif ARC_DP_DEBUG
43 #define L_addsub_df
44 #define __adddf3 __adddf3_c
45 #define __subdf3 __subdf3_c
46 #endif
47 #ifndef __ARC_NORM__
48 #define L_mul_df
49 #define L_div_df
50 #elif (!defined (__ARC700__) && !defined (__ARC_MUL64__) \
51        && !defined(__ARC_MUL32BY16__))
52 #define L_mul_df
53 #define L_div_df
54 #undef QUIET_NAN
55 #define QUIET_NAN 0xfffffffffffffLL
56 #elif ARC_DP_DEBUG
57 #define L_mul_df
58 #define __muldf3 __muldf3_c
59 #define L_div_df
60 #define __divdf3 __divdf3_c
61 #endif
62 #ifndef __ARC_NORM__
63 #define L_df_to_sf
64 #define L_si_to_df
65 #define L_df_to_si
66 #define L_tf_to_usi /* need to defined this instead of df_to_usi */
67 #define L_usi_to_df
68 #elif ARC_DP_DEBUG
69 #define L_df_to_sf
70 #define __truncdfsf2 __truncdfsf2_c
71 #define L_si_to_df
72 #define __floatsidf __floatsidf_c
73 #define L_df_to_si
74 #define __fixdfsi __fixdfsi_c
75 #define L_tf_to_usi
76 #define __fixunsdfsi __fixunsdfsi_c
77 #define L_usi_to_df
78 #define __floatunsidf __floatunsidf_c
79 #endif
80 #ifndef __ARC_NORM__
81 #define L_fpcmp_parts_df
82 #define L_compare_df
83 #define L_eq_df
84 #define L_ne_df
85 #define L_gt_df
86 #define L_ge_df
87 #define L_lt_df
88 #define L_le_df
89 #define L_unord_df
90 #define L_negate_df
91 #elif ARC_DP_DEBUG
92 #define L_fpcmp_parts_df
93 #define L_eq_df
94 #define __eqdf2 __eqdf2_c
95 #define L_gt_df
96 #define __gtdf2 __gtdf2_c
97 #define L_ge_df
98 #define __gedf2 __gedf2_c
99 #define L_unord_df
100 #define __unorddf2 __unorddf2_c
101 #endif