Back to index

glibc  2.9
fesetround.c File Reference
#include <fenv.h>

Go to the source code of this file.


int fesetround (int round)
 libm_hidden_def (fesetround)

Function Documentation

int fesetround ( int  round)

Definition at line 24 of file fesetround.c.

  fexcept_t fpcr;

  if (round & ~FE_UPWARD)
    /* ROUND is no valid rounding mode.  */
    return 1;

  __asm__ ("fmove%.l %!,%0" : "=dm" (fpcr));
  fpcr &= ~FE_UPWARD;
  fpcr |= round;
  __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr));

  return 0;

Here is the call graph for this function: