Back to index

glibc  2.9
Defines | Functions
s_remquo.c File Reference
#include <math.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define SUFF
#define float_type   double
#define CONCATX(a, b)   __CONCAT(a,b)
#define s(name)   CONCATX(name,SUFF)
#define weak_aliasx(a, b)   weak_alias(a,b)


float_type s() __remquo (float_type x, float_type y, int *quo)

Define Documentation

#define CONCATX (   a,
)    __CONCAT(a,b)

Definition at line 30 of file s_remquo.c.

#define float_type   double

Definition at line 27 of file s_remquo.c.

#define s (   name)    CONCATX(name,SUFF)

Definition at line 31 of file s_remquo.c.

#define SUFF

Definition at line 24 of file s_remquo.c.

#define weak_aliasx (   a,
)    weak_alias(a,b)

Definition at line 47 of file s_remquo.c.

Function Documentation

float_type s() __remquo ( float_type  x,
float_type  y,
int quo 

Definition at line 34 of file s_remquo.c.

  float_type result;
  int cquo, fpsr;

  __asm ("frem%.x %2,%0\n\tfmove%.l %/fpsr,%1"
        : "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x));
  cquo = (fpsr >> 16) & 0x7f;
  if (fpsr & (1 << 23))
    cquo = -cquo;
  *quo = cquo;
  return result;