diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-08-12 13:22:27 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2008-08-12 13:22:27 +0000 |
commit | e0bddf109cc33590570b30eceea42bb6fcdea8ec (patch) | |
tree | a63229f3d0203e709f678594f6a7e48b9d08425c /gcc | |
parent | 3e479de394686d3957c4945d529bfdcf4d338de8 (diff) | |
download | gcc-e0bddf109cc33590570b30eceea42bb6fcdea8ec.zip gcc-e0bddf109cc33590570b30eceea42bb6fcdea8ec.tar.gz gcc-e0bddf109cc33590570b30eceea42bb6fcdea8ec.tar.bz2 |
float_disf.c: New file.
* config/spu/float_disf.c: New file.
* config/spu/float_unsdisf.c: New file.
* config/spu/t-elf (LIB2FUNCS_STATIC_EXTRA): Add them.
(LIB2FUNCS_EXCLUDE): Define.
From-SVN: r139015
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/spu/float_disf.c | 30 | ||||
-rw-r--r-- | gcc/config/spu/float_unsdisf.c | 30 | ||||
-rw-r--r-- | gcc/config/spu/t-spu-elf | 7 |
4 files changed, 74 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33e866c..d4289a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,11 @@ 2008-08-12 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> + + * config/spu/float_disf.c: New file. + * config/spu/float_unsdisf.c: New file. + * config/spu/t-elf (LIB2FUNCS_STATIC_EXTRA): Add them. + (LIB2FUNCS_EXCLUDE): Define. + +2008-08-12 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Trevor Smigiel <trevor_smigiel@playstation.sony.com> * real.h (struct real_format): New member round_towards_zero. diff --git a/gcc/config/spu/float_disf.c b/gcc/config/spu/float_disf.c new file mode 100644 index 0000000..d8f3eb4 --- /dev/null +++ b/gcc/config/spu/float_disf.c @@ -0,0 +1,30 @@ +/* Copyright (C) 2008 Free Software Foundation, Inc. + + This file is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This file is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with this file; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +/* As a special exception, if you link this library with files compiled with + GCC to produce an executable, this does not cause the resulting executable + to be covered by the GNU General Public License. The exception does not + however invalidate any other reasons why the executable file might be covered + by the GNU General Public License. */ + +float __floatdisf (long long x) +{ + /* The SPU back-end now generates inline code for this conversion. + This file is solely used to provide the __floatdisf functions + for objects generated with prior versions of GCC. */ + return x; +} diff --git a/gcc/config/spu/float_unsdisf.c b/gcc/config/spu/float_unsdisf.c new file mode 100644 index 0000000..0f16b96 --- /dev/null +++ b/gcc/config/spu/float_unsdisf.c @@ -0,0 +1,30 @@ +/* Copyright (C) 2008 Free Software Foundation, Inc. + + This file is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This file is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with this file; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +/* As a special exception, if you link this library with files compiled with + GCC to produce an executable, this does not cause the resulting executable + to be covered by the GNU General Public License. The exception does not + however invalidate any other reasons why the executable file might be covered + by the GNU General Public License. */ + +float __floatundisf (unsigned long long x) +{ + /* The SPU back-end now generates inline code for this conversion. + This file is solely used to provide the __floatundisf function + for objects generated with prior versions of GCC. */ + return x; +} diff --git a/gcc/config/spu/t-spu-elf b/gcc/config/spu/t-spu-elf index 0a3947d..017f09d 100644 --- a/gcc/config/spu/t-spu-elf +++ b/gcc/config/spu/t-spu-elf @@ -21,8 +21,15 @@ CROSS_LIBGCC1 = TARGET_LIBGCC2_CFLAGS = -fPIC -mwarn-reloc -D__IN_LIBGCC2 +# We exclude those because the libgcc2.c default versions do not support +# the SPU single-precision format (round towards zero). We provide our +# own versions below. +LIB2FUNCS_EXCLUDE = _floatdisf _floatundisf + LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/spu/float_unssidf.c \ $(srcdir)/config/spu/float_unsdidf.c \ + $(srcdir)/config/spu/float_unsdisf.c \ + $(srcdir)/config/spu/float_disf.c \ $(srcdir)/config/spu/mfc_tag_table.c \ $(srcdir)/config/spu/mfc_tag_reserve.c \ $(srcdir)/config/spu/mfc_tag_release.c \ |