OpenCores
URL https://opencores.org/ocsvn/hf-risc/hf-risc/trunk

Subversion Repositories hf-risc

[/] [hf-risc/] [trunk/] [tools/] [riscv-gnu-toolchain-master/] [glibc/] [sysdeps/] [riscv/] [fpu/] [s_fpclassifyf.c] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 serginhofr
#include <math.h>
2
#include "fpu_control.h"
3
#include "math_private.h"
4
 
5
int __fpclassifyf (float x)
6
{
7
  int cls = _FCLASS(x);
8
  if (__builtin_expect(cls & _FCLASS_NORM, _FCLASS_NORM))
9
    return FP_NORMAL;
10
  if (__builtin_expect(cls & _FCLASS_ZERO, _FCLASS_ZERO))
11
    return FP_ZERO;
12
  if (__builtin_expect(cls & _FCLASS_SUBNORM, _FCLASS_SUBNORM))
13
    return FP_SUBNORMAL;
14
  if (__builtin_expect(cls & _FCLASS_INF, _FCLASS_INF))
15
    return FP_INFINITE;
16
  return FP_NAN;
17
}
18
libm_hidden_def (__fpclassifyf)

powered by: WebSVN 2.1.0

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