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_fmin.c] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 serginhofr
#include <math.h>
2
 
3
double __fmin (double x, double y)
4
{
5
#ifdef __riscv_soft_float
6
  if (isnan(x))
7
      return y;
8
  if (isnan(y))
9
      return x;
10
  return (x < y) ? x : y;
11
#else
12
  double res;
13
  asm ("fmin.d %0, %1, %2" : "=f"(res) : "f"(x), "f"(y));
14
  return res;
15
#endif
16
}
17
weak_alias (__fmin, fmin)

powered by: WebSVN 2.1.0

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