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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config/] [soft-fp/] [t-softfp] - Blame information for rev 282

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 282 jeremybenn
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
2
 
3
# This file is part of GCC.
4
 
5
# GCC is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3, or (at your option)
8
# any later version.
9
 
10
# GCC is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
14
 
15
# You should have received a copy of the GNU General Public License
16
# along with GCC; see the file COPYING3.  If not see
17
# .
18
 
19
# Targets using soft-fp should define the following variables:
20
#
21
# softfp_float_modes: a list of soft-float floating-point modes,
22
#                     e.g. sf df
23
# softfp_int_modes: a list of integer modes for which to define conversions,
24
#                   e.g. si di
25
# softfp_extensions: a list of extensions between floating-point modes,
26
#                    e.g. sfdf
27
# softfp_truncations: a list of truncations between floating-point modes,
28
#                     e.g. dfsf
29
# softfp_machine_header: the target sfp-machine.h file (relative to config/),
30
#                        e.g. rs6000/sfp-machine.h
31
#
32
# Extensions and truncations should include those where only one mode
33
# is a soft-float mode; for example, sftf where sf is hard-float and
34
# tf is soft-float.
35
#
36
# If the libgcc2.c functions should not be replaced, also define:
37
#
38
# softfp_exclude_libgcc2 := y
39
#
40
# Avoiding replacing the libgcc2.c functions is a temporary measure
41
# for targets with both hard-float and soft-float multilibs, since
42
# these variables apply for all multilibs.  With toplevel libgcc,
43
# soft-fp can be used conditionally on the multilib instead.
44
#
45
# If the code should not be compiled at all for some multilibs, define:
46
#
47
# softfp_wrap_start: text to put at the start of wrapper source files,
48
#                    output with echo
49
#                    e.g. '#ifndef __powerpc64__'
50
# softfp_wrap_end: text to put at the end of wrapper source files,
51
#                  e.g. '#endif'
52
#
53
# This is another temporary measure.
54
 
55
softfp_float_funcs = add$(m)3 div$(m)3 eq$(m)2 ge$(m)2 le$(m)2 mul$(m)3 \
56
  neg$(m)2 sub$(m)3 unord$(m)2
57
softfp_floatint_funcs = fix$(m)$(i) fixuns$(m)$(i) \
58
  float$(i)$(m) floatun$(i)$(m)
59
 
60
softfp_func_list := \
61
  $(foreach m,$(softfp_float_modes), \
62
              $(softfp_float_funcs) \
63
              $(foreach i,$(softfp_int_modes), \
64
                          $(softfp_floatint_funcs))) \
65
  $(foreach e,$(softfp_extensions),extend$(e)2) \
66
  $(foreach t,$(softfp_truncations),trunc$(t)2)
67
 
68
ifeq ($(softfp_exclude_libgcc2),y)
69
# This list is taken from mklibgcc.in and doesn't presently allow for
70
# 64-bit targets where si should become di and di should become ti.
71
softfp_func_list := $(filter-out floatdidf floatdisf fixunsdfsi fixunssfsi \
72
  fixunsdfdi fixdfdi fixunssfdi fixsfdi fixxfdi fixunsxfdi \
73
  floatdixf fixunsxfsi fixtfdi fixunstfdi floatditf \
74
  floatundidf floatundisf floatundixf floatunditf,$(softfp_func_list))
75
endif
76
 
77
ifeq ($(softfp_wrap_start),)
78
softfp_file_list := \
79
  $(addsuffix .c,$(addprefix $(srcdir)/config/soft-fp/,$(softfp_func_list)))
80
else
81
softfp_file_list := $(addsuffix .c,$(softfp_func_list))
82
 
83
$(softfp_file_list):
84
        echo $(softfp_wrap_start) > $@
85
        echo '#include "config/soft-fp/$@"' >> $@
86
        echo $(softfp_wrap_end) >> $@
87
endif
88
 
89
LIB2FUNCS_EXTRA += $(softfp_file_list)
90
 
91
ifneq ($(softfp_exclude_libgcc2),y)
92
# Functions in libgcc2.c are excluded for each soft-float mode (a
93
# target may have both soft-float and hard-float modes), for the fixed
94
# list of integer modes (si and di) for which libgcc2.c defines any
95
# such functions.  Depending on the target, the si and di symbols may
96
# in fact define di and ti functions.
97
 
98
LIB2FUNCS_EXCLUDE += \
99
  $(addprefix _,$(foreach m,$(softfp_float_modes), \
100
                            $(foreach i,si di, \
101
                                        $(softfp_floatint_funcs))))
102
endif
103
 
104
SFP_MACHINE := sfp-machine.h
105
 
106
$(SFP_MACHINE): $(srcdir)/config/$(softfp_machine_header)
107
        cp $(srcdir)/config/$(softfp_machine_header) $(SFP_MACHINE)

powered by: WebSVN 2.1.0

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