source: trunk/libs/newlib/src/newlib/libm/machine/spu/headers/isnanf4.h @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 3.2 KB
Line 
1/* --------------------------------------------------------------  */
2/* (C)Copyright 2006,2008,                                         */
3/* International Business Machines Corporation                     */
4/* All Rights Reserved.                                            */
5/*                                                                 */
6/* Redistribution and use in source and binary forms, with or      */
7/* without modification, are permitted provided that the           */
8/* following conditions are met:                                   */
9/*                                                                 */
10/* - Redistributions of source code must retain the above copyright*/
11/*   notice, this list of conditions and the following disclaimer. */
12/*                                                                 */
13/* - Redistributions in binary form must reproduce the above       */
14/*   copyright notice, this list of conditions and the following   */
15/*   disclaimer in the documentation and/or other materials        */
16/*   provided with the distribution.                               */
17/*                                                                 */
18/* - Neither the name of IBM Corporation nor the names of its      */
19/*   contributors may be used to endorse or promote products       */
20/*   derived from this software without specific prior written     */
21/*   permission.                                                   */
22/*                                                                 */
23/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND          */
24/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,     */
25/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF        */
26/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE        */
27/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR            */
28/* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,    */
29/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT    */
30/* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;    */
31/* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)        */
32/* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN       */
33/* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR    */
34/* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,  */
35/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.              */
36/* --------------------------------------------------------------  */
37/* PROLOG END TAG zYx                                              */
38#ifdef __SPU__
39#ifndef _ISNANF4_H_
40#define _ISNANF4_H_     1
41
42#include <spu_intrinsics.h>
43
44/*
45 * FUNCTION
46 *      vector unsigned int _isnanf4(vector float x)
47 *
48 * DESCRIPTION
49 *      The _isnanf4 function returns a vector in which each element indicates
50 *      if the corresponding element of x is NaN.
51 *
52 *      On the SPU, this function always returns 0, since NaNs are not
53 *      supported.
54 *
55 * RETURNS
56 *      UINT_MAX (0xFFFFFFFF)  if the element of x is a NaN
57 *      0        (0x00000000)  otherwise (always on the SPU)
58 *
59 */
60static __inline vector unsigned int _isnanf4(vector float __attribute__((__unused__))x)
61{
62  return spu_splats((unsigned int)0);   
63}
64
65#endif // _ISNANF4_H_
66#endif /* __SPU__ */
Note: See TracBrowser for help on using the repository browser.