root/arch/alpha/math-emu/ieee-math.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (C) 1992,1995 by
   3  * Digital Equipment Corporation, Maynard, Massachusetts.
   4  * This file may be redistributed according to the terms of the
   5  * GNU General Public License.
   6  */
   7 #ifndef __ieee_math_h__
   8 #define __ieee_math_h__
   9 
  10 #include <asm/fpu.h>
  11 
  12 #define ROUND_SHIFT     6               /* make space for trap-enable bits */
  13 #define RM(f)           (((f) >> ROUND_SHIFT) & 0x3)
  14 
  15 #define ROUND_CHOP      (FPCR_DYN_CHOPPED >> FPCR_DYN_SHIFT)
  16 #define ROUND_NINF      (FPCR_DYN_MINUS   >> FPCR_DYN_SHIFT)
  17 #define ROUND_NEAR      (FPCR_DYN_NORMAL  >> FPCR_DYN_SHIFT)
  18 #define ROUND_PINF      (FPCR_DYN_PLUS    >> FPCR_DYN_SHIFT)
  19 
  20 extern unsigned long ieee_CVTST (int rm, unsigned long a, unsigned long *b);
  21 extern unsigned long ieee_CVTTS (int rm, unsigned long a, unsigned long *b);
  22 extern unsigned long ieee_CVTQS (int rm, unsigned long a, unsigned long *b);
  23 extern unsigned long ieee_CVTQT (int rm, unsigned long a, unsigned long *b);
  24 extern unsigned long ieee_CVTTQ (int rm, unsigned long a, unsigned long *b);
  25 
  26 extern unsigned long ieee_CMPTEQ (unsigned long a, unsigned long b,
  27                                   unsigned long *c);
  28 extern unsigned long ieee_CMPTLT (unsigned long a, unsigned long b,
  29                                   unsigned long *c);
  30 extern unsigned long ieee_CMPTLE (unsigned long a, unsigned long b,
  31                                   unsigned long *c);
  32 extern unsigned long ieee_CMPTUN (unsigned long a, unsigned long b,
  33                                   unsigned long *c);
  34 
  35 extern unsigned long ieee_ADDS (int rm, unsigned long a, unsigned long b,
  36                                 unsigned long *c);
  37 extern unsigned long ieee_ADDT (int rm, unsigned long a, unsigned long b,
  38                                 unsigned long *c);
  39 extern unsigned long ieee_SUBS (int rm, unsigned long a, unsigned long b,
  40                                 unsigned long *c);
  41 extern unsigned long ieee_SUBT (int rm, unsigned long a, unsigned long b,
  42                                 unsigned long *c);
  43 extern unsigned long ieee_MULS (int rm, unsigned long a, unsigned long b,
  44                                 unsigned long *c);
  45 extern unsigned long ieee_MULT (int rm, unsigned long a, unsigned long b,
  46                                 unsigned long *c);
  47 extern unsigned long ieee_DIVS (int rm, unsigned long a, unsigned long b,
  48                                 unsigned long *c);
  49 extern unsigned long ieee_DIVT (int rm, unsigned long a, unsigned long b,
  50                                 unsigned long *c);
  51 
  52 #endif /* __ieee_math_h__ */

/* [previous][next][first][last][top][bottom][index][help] */