2007-04-26 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/ieeefp.h: use prefixed __ieeefp_ macros that can be overridden via machine/ieeefp.h. * libc/include/machine/ieeefp.h: Add SPU specific C99 and ieeefp macros for isnan and related macros. * libc/include/math.h: Allow C99 isfinite, isinf, and isnan to be overridden via machine/ieeefp.h. * libm/machine/spu/Makefile.am: Add new files. * libm/machine/spu/Makefile.in: Autogenerate with new files. * libm/machine/spu/sf_fpclassify.c: Add SPU specific __fpclassifyf. * libm/machine/spu/sf_finite.c: Add SPU specific finitef. * libm/machine/spu/sf_isinf.c: Add SPU specific isinff. * libm/machine/spu/sf_isinff.c: Add SPU specific __isinff. * libm/machine/spu/sf_isnan.c: Add SPU specific isnanf. * libm/machine/spu/sf_isnanf.c: Add SPU specific __isnanf. * libm/machine/spu/sf_nan.c: Add SPU specific nanf.
This commit is contained in:
@ -8,7 +8,9 @@ INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
|
||||
LIB_SOURCES = \
|
||||
feclearexcept.c fe_dfl_env.c fegetenv.c fegetexceptflag.c \
|
||||
fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \
|
||||
fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c
|
||||
fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c \
|
||||
sf_finite.c sf_fpclassify.c sf_isinf.c sf_isinff.c sf_isnanf.c \
|
||||
sf_isnan.c sf_nan.c
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
lib_a_SOURCES = $(LIB_SOURCES)
|
||||
|
@ -47,7 +47,11 @@ DIST_COMMON = $(srcdir)/../../../Makefile.shared \
|
||||
$(srcdir)/../../../../compile $(srcdir)/../../../../compile \
|
||||
$(srcdir)/../../../../compile $(srcdir)/../../../../compile \
|
||||
$(srcdir)/../../../../compile $(srcdir)/../../../../compile \
|
||||
$(srcdir)/../../../../compile $(srcdir)/../../../../compile
|
||||
$(srcdir)/../../../../compile $(srcdir)/../../../../compile \
|
||||
$(srcdir)/../../../../compile $(srcdir)/../../../../compile \
|
||||
$(srcdir)/../../../../compile $(srcdir)/../../../../compile \
|
||||
$(srcdir)/../../../../compile $(srcdir)/../../../../compile \
|
||||
$(srcdir)/../../../../compile
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
|
||||
@ -68,7 +72,10 @@ am__objects_1 = lib_a-feclearexcept.$(OBJEXT) \
|
||||
lib_a-feholdexcept.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \
|
||||
lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \
|
||||
lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \
|
||||
lib_a-feupdateenv.$(OBJEXT)
|
||||
lib_a-feupdateenv.$(OBJEXT) lib_a-sf_finite.$(OBJEXT) \
|
||||
lib_a-sf_fpclassify.$(OBJEXT) lib_a-sf_isinf.$(OBJEXT) \
|
||||
lib_a-sf_isinff.$(OBJEXT) lib_a-sf_isnanf.$(OBJEXT) \
|
||||
lib_a-sf_isnan.$(OBJEXT) lib_a-sf_nan.$(OBJEXT)
|
||||
am_lib_a_OBJECTS = $(am__objects_1)
|
||||
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir)
|
||||
@ -197,7 +204,9 @@ INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
|
||||
LIB_SOURCES = \
|
||||
feclearexcept.c fe_dfl_env.c fegetenv.c fegetexceptflag.c \
|
||||
fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \
|
||||
fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c
|
||||
fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c \
|
||||
sf_finite.c sf_fpclassify.c sf_isinf.c sf_isinff.c sf_isnanf.c \
|
||||
sf_isnan.c sf_nan.c
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
lib_a_SOURCES = $(LIB_SOURCES)
|
||||
@ -334,6 +343,48 @@ lib_a-feupdateenv.o: feupdateenv.c
|
||||
|
||||
lib_a-feupdateenv.obj: feupdateenv.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi`
|
||||
|
||||
lib_a-sf_finite.o: sf_finite.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_finite.o `test -f 'sf_finite.c' || echo '$(srcdir)/'`sf_finite.c
|
||||
|
||||
lib_a-sf_finite.obj: sf_finite.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_finite.obj `if test -f 'sf_finite.c'; then $(CYGPATH_W) 'sf_finite.c'; else $(CYGPATH_W) '$(srcdir)/sf_finite.c'; fi`
|
||||
|
||||
lib_a-sf_fpclassify.o: sf_fpclassify.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_fpclassify.o `test -f 'sf_fpclassify.c' || echo '$(srcdir)/'`sf_fpclassify.c
|
||||
|
||||
lib_a-sf_fpclassify.obj: sf_fpclassify.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_fpclassify.obj `if test -f 'sf_fpclassify.c'; then $(CYGPATH_W) 'sf_fpclassify.c'; else $(CYGPATH_W) '$(srcdir)/sf_fpclassify.c'; fi`
|
||||
|
||||
lib_a-sf_isinf.o: sf_isinf.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_isinf.o `test -f 'sf_isinf.c' || echo '$(srcdir)/'`sf_isinf.c
|
||||
|
||||
lib_a-sf_isinf.obj: sf_isinf.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_isinf.obj `if test -f 'sf_isinf.c'; then $(CYGPATH_W) 'sf_isinf.c'; else $(CYGPATH_W) '$(srcdir)/sf_isinf.c'; fi`
|
||||
|
||||
lib_a-sf_isinff.o: sf_isinff.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_isinff.o `test -f 'sf_isinff.c' || echo '$(srcdir)/'`sf_isinff.c
|
||||
|
||||
lib_a-sf_isinff.obj: sf_isinff.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_isinff.obj `if test -f 'sf_isinff.c'; then $(CYGPATH_W) 'sf_isinff.c'; else $(CYGPATH_W) '$(srcdir)/sf_isinff.c'; fi`
|
||||
|
||||
lib_a-sf_isnanf.o: sf_isnanf.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_isnanf.o `test -f 'sf_isnanf.c' || echo '$(srcdir)/'`sf_isnanf.c
|
||||
|
||||
lib_a-sf_isnanf.obj: sf_isnanf.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_isnanf.obj `if test -f 'sf_isnanf.c'; then $(CYGPATH_W) 'sf_isnanf.c'; else $(CYGPATH_W) '$(srcdir)/sf_isnanf.c'; fi`
|
||||
|
||||
lib_a-sf_isnan.o: sf_isnan.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_isnan.o `test -f 'sf_isnan.c' || echo '$(srcdir)/'`sf_isnan.c
|
||||
|
||||
lib_a-sf_isnan.obj: sf_isnan.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_isnan.obj `if test -f 'sf_isnan.c'; then $(CYGPATH_W) 'sf_isnan.c'; else $(CYGPATH_W) '$(srcdir)/sf_isnan.c'; fi`
|
||||
|
||||
lib_a-sf_nan.o: sf_nan.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_nan.o `test -f 'sf_nan.c' || echo '$(srcdir)/'`sf_nan.c
|
||||
|
||||
lib_a-sf_nan.obj: sf_nan.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_nan.obj `if test -f 'sf_nan.c'; then $(CYGPATH_W) 'sf_nan.c'; else $(CYGPATH_W) '$(srcdir)/sf_nan.c'; fi`
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
|
41
newlib/libm/machine/spu/sf_finite.c
Normal file
41
newlib/libm/machine/spu/sf_finite.c
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
(C) Copyright 2007
|
||||
International Business Machines Corporation,
|
||||
Sony Computer Entertainment, Incorporated,
|
||||
Toshiba Corporation,
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the names of the copyright holders nor the names of their
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* On the SPU always return 1.
|
||||
*/
|
||||
int
|
||||
finitef(float x)
|
||||
{
|
||||
return 1;
|
||||
}
|
24
newlib/libm/machine/spu/sf_fpclassify.c
Normal file
24
newlib/libm/machine/spu/sf_fpclassify.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software
|
||||
* is freely granted, provided that this notice is preserved.
|
||||
*/
|
||||
|
||||
#include "fdlibm.h"
|
||||
|
||||
/*
|
||||
* On the SPU, single precision floating point returns only FP_NORMAL and
|
||||
* FP_ZERO, since FP_NAN, FP_INFINITE, and FP_SUBNORMAL are not
|
||||
* supported, base on the common f_fpclassify.c.
|
||||
*/
|
||||
int
|
||||
__fpclassifyf (float x)
|
||||
{
|
||||
__uint32_t w;
|
||||
|
||||
GET_FLOAT_WORD(w,x);
|
||||
|
||||
if (w == 0x00000000 || w == 0x80000000)
|
||||
return FP_ZERO;
|
||||
return FP_NORMAL;
|
||||
}
|
43
newlib/libm/machine/spu/sf_isinf.c
Normal file
43
newlib/libm/machine/spu/sf_isinf.c
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
(C) Copyright 2007
|
||||
International Business Machines Corporation,
|
||||
Sony Computer Entertainment, Incorporated,
|
||||
Toshiba Corporation,
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the names of the copyright holders nor the names of their
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* On the SPU isinff(x) always returns 0.
|
||||
*
|
||||
* isinff is an extension declared in <ieeefp.h> and <math.h>.
|
||||
*/
|
||||
int
|
||||
isinff (float x)
|
||||
{
|
||||
return 0;
|
||||
}
|
41
newlib/libm/machine/spu/sf_isinff.c
Normal file
41
newlib/libm/machine/spu/sf_isinff.c
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
(C) Copyright 2007
|
||||
International Business Machines Corporation,
|
||||
Sony Computer Entertainment, Incorporated,
|
||||
Toshiba Corporation,
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the names of the copyright holders nor the names of their
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* On the SPU __isinff(x) always returns 0.
|
||||
*/
|
||||
int
|
||||
__isinff (float x)
|
||||
{
|
||||
return 0;
|
||||
}
|
41
newlib/libm/machine/spu/sf_isnan.c
Normal file
41
newlib/libm/machine/spu/sf_isnan.c
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
(C) Copyright 2007
|
||||
International Business Machines Corporation,
|
||||
Sony Computer Entertainment, Incorporated,
|
||||
Toshiba Corporation,
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the names of the copyright holders nor the names of their
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* On the SPU single precision floating does not support NAN's.
|
||||
*/
|
||||
int
|
||||
isnanf(float x)
|
||||
{
|
||||
return 0;
|
||||
}
|
41
newlib/libm/machine/spu/sf_isnanf.c
Normal file
41
newlib/libm/machine/spu/sf_isnanf.c
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
(C) Copyright 2007
|
||||
International Business Machines Corporation,
|
||||
Sony Computer Entertainment, Incorporated,
|
||||
Toshiba Corporation,
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the names of the copyright holders nor the names of their
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* On the SPU single precision floating does not support NAN's.
|
||||
*/
|
||||
int
|
||||
__isnanf(float x)
|
||||
{
|
||||
return 0;
|
||||
}
|
42
newlib/libm/machine/spu/sf_nan.c
Normal file
42
newlib/libm/machine/spu/sf_nan.c
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
(C) Copyright 2007
|
||||
International Business Machines Corporation,
|
||||
Sony Computer Entertainment, Incorporated,
|
||||
Toshiba Corporation,
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the names of the copyright holders nor the names of their
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* On the SPU single precision floating does not support NAN's, and nanf
|
||||
* is documented as returning zero.
|
||||
*/
|
||||
float
|
||||
nanf(const char *unused)
|
||||
{
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user