source: trunk/libs/newlib/src/newlib/libm/machine/spu/sf_fpclassify.c @ 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: 575 bytes
Line 
1/* Copyright (C) 2002 by  Red Hat, Incorporated. All rights reserved.
2 *
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
5 */
6
7#include "fdlibm.h"
8
9/*
10 * On the SPU, single precision floating point returns only FP_NORMAL and
11 * FP_ZERO, since FP_NAN, FP_INFINITE, and FP_SUBNORMAL are not
12 * supported, base on the common f_fpclassify.c.
13 */
14int
15__fpclassifyf (float x)
16{
17  __uint32_t w;
18
19  GET_FLOAT_WORD(w,x);
20
21  if (w == 0x00000000 || w == 0x80000000)
22    return FP_ZERO;
23  return FP_NORMAL;
24}
Note: See TracBrowser for help on using the repository browser.