Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
ieee754int.h File Reference
#include "ieee754.h"

Go to the source code of this file.

Macros

#define DP_EBIAS   1023
 
#define DP_EMIN   (-1022)
 
#define DP_EMAX   1023
 
#define DP_MBITS   52
 
#define SP_EBIAS   127
 
#define SP_EMIN   (-126)
 
#define SP_EMAX   127
 
#define SP_MBITS   23
 
#define DP_MBIT(x)   ((u64)1 << (x))
 
#define DP_HIDDEN_BIT   DP_MBIT(DP_MBITS)
 
#define DP_SIGN_BIT   DP_MBIT(63)
 
#define SP_MBIT(x)   ((u32)1 << (x))
 
#define SP_HIDDEN_BIT   SP_MBIT(SP_MBITS)
 
#define SP_SIGN_BIT   SP_MBIT(31)
 
#define SPSIGN(sp)   (sp.parts.sign)
 
#define SPBEXP(sp)   (sp.parts.bexp)
 
#define SPMANT(sp)   (sp.parts.mant)
 
#define DPSIGN(dp)   (dp.parts.sign)
 
#define DPBEXP(dp)   (dp.parts.bexp)
 
#define DPMANT(dp)   (dp.parts.mant)
 
#define CLPAIR(x, y)   ((x)*6+(y))
 
#define CLEARCX   (ieee754_csr.cx = 0)
 
#define SETCX(x)   (ieee754_csr.cx |= (x), ieee754_csr.sx |= (x))
 
#define SETANDTESTCX(x)   (SETCX(x), ieee754_csr.mx & (x))
 
#define TSTX()   (ieee754_csr.cx & ieee754_csr.mx)
 
#define COMPXSP   unsigned xm; int xe; int xs __maybe_unused; int xc
 
#define COMPYSP   unsigned ym; int ye; int ys; int yc
 
#define EXPLODESP(v, vc, vs, ve, vm)
 
#define EXPLODEXSP   EXPLODESP(x, xc, xs, xe, xm)
 
#define EXPLODEYSP   EXPLODESP(y, yc, ys, ye, ym)
 
#define COMPXDP   u64 xm; int xe; int xs __maybe_unused; int xc
 
#define COMPYDP   u64 ym; int ye; int ys; int yc
 
#define EXPLODEDP(v, vc, vs, ve, vm)
 
#define EXPLODEXDP   EXPLODEDP(x, xc, xs, xe, xm)
 
#define EXPLODEYDP   EXPLODEDP(y, yc, ys, ye, ym)
 
#define FLUSHDP(v, vc, vs, ve, vm)
 
#define FLUSHSP(v, vc, vs, ve, vm)
 
#define FLUSHXDP   FLUSHDP(x, xc, xs, xe, xm)
 
#define FLUSHYDP   FLUSHDP(y, yc, ys, ye, ym)
 
#define FLUSHXSP   FLUSHSP(x, xc, xs, xe, xm)
 
#define FLUSHYSP   FLUSHSP(y, yc, ys, ye, ym)
 

Macro Definition Documentation

#define CLEARCX   (ieee754_csr.cx = 0)

Definition at line 59 of file ieee754int.h.

#define CLPAIR (   x,
  y 
)    ((x)*6+(y))

Definition at line 57 of file ieee754int.h.

#define COMPXDP   u64 xm; int xe; int xs __maybe_unused; int xc

Definition at line 106 of file ieee754int.h.

#define COMPXSP   unsigned xm; int xe; int xs __maybe_unused; int xc

Definition at line 72 of file ieee754int.h.

#define COMPYDP   u64 ym; int ye; int ys; int yc

Definition at line 109 of file ieee754int.h.

#define COMPYSP   unsigned ym; int ye; int ys; int yc

Definition at line 75 of file ieee754int.h.

#define DP_EBIAS   1023

Definition at line 30 of file ieee754int.h.

#define DP_EMAX   1023

Definition at line 32 of file ieee754int.h.

#define DP_EMIN   (-1022)

Definition at line 31 of file ieee754int.h.

#define DP_HIDDEN_BIT   DP_MBIT(DP_MBITS)

Definition at line 41 of file ieee754int.h.

#define DP_MBIT (   x)    ((u64)1 << (x))

Definition at line 40 of file ieee754int.h.

#define DP_MBITS   52

Definition at line 33 of file ieee754int.h.

#define DP_SIGN_BIT   DP_MBIT(63)

Definition at line 42 of file ieee754int.h.

#define DPBEXP (   dp)    (dp.parts.bexp)

Definition at line 54 of file ieee754int.h.

#define DPMANT (   dp)    (dp.parts.mant)

Definition at line 55 of file ieee754int.h.

#define DPSIGN (   dp)    (dp.parts.sign)

Definition at line 53 of file ieee754int.h.

#define EXPLODEDP (   v,
  vc,
  vs,
  ve,
  vm 
)
Value:
{\
vm = DPMANT(v);\
vs = DPSIGN(v);\
ve = DPBEXP(v);\
if(ve == DP_EMAX+1+DP_EBIAS){\
if(vm == 0)\
else if(vm & DP_MBIT(DP_MBITS-1)) \
else \
} else if(ve == DP_EMIN-1+DP_EBIAS) {\
if(vm) {\
ve = DP_EMIN;\
} else\
} else {\
ve -= DP_EBIAS;\
}\
}

Definition at line 112 of file ieee754int.h.

#define EXPLODESP (   v,
  vc,
  vs,
  ve,
  vm 
)
Value:
{\
vs = SPSIGN(v);\
ve = SPBEXP(v);\
vm = SPMANT(v);\
if(ve == SP_EMAX+1+SP_EBIAS){\
if(vm == 0)\
else if(vm & SP_MBIT(SP_MBITS-1)) \
else \
} else if(ve == SP_EMIN-1+SP_EBIAS) {\
if(vm) {\
ve = SP_EMIN;\
} else\
} else {\
ve -= SP_EBIAS;\
}\
}

Definition at line 78 of file ieee754int.h.

#define EXPLODEXDP   EXPLODEDP(x, xc, xs, xe, xm)

Definition at line 136 of file ieee754int.h.

#define EXPLODEXSP   EXPLODESP(x, xc, xs, xe, xm)

Definition at line 102 of file ieee754int.h.

#define EXPLODEYDP   EXPLODEDP(y, yc, ys, ye, ym)

Definition at line 137 of file ieee754int.h.

#define EXPLODEYSP   EXPLODESP(y, yc, ys, ye, ym)

Definition at line 103 of file ieee754int.h.

#define FLUSHDP (   v,
  vc,
  vs,
  ve,
  vm 
)
Value:
if(ieee754_csr.nod) {\
ve = DP_EMIN-1+DP_EBIAS;\
vm = 0;\
v = ieee754dp_zero(vs);\
}\
}

Definition at line 139 of file ieee754int.h.

#define FLUSHSP (   v,
  vc,
  vs,
  ve,
  vm 
)
Value:
if(ieee754_csr.nod) {\
ve = SP_EMIN-1+SP_EBIAS;\
vm = 0;\
v = ieee754sp_zero(vs);\
}\
}

Definition at line 150 of file ieee754int.h.

#define FLUSHXDP   FLUSHDP(x, xc, xs, xe, xm)

Definition at line 161 of file ieee754int.h.

#define FLUSHXSP   FLUSHSP(x, xc, xs, xe, xm)

Definition at line 163 of file ieee754int.h.

#define FLUSHYDP   FLUSHDP(y, yc, ys, ye, ym)

Definition at line 162 of file ieee754int.h.

#define FLUSHYSP   FLUSHSP(y, yc, ys, ye, ym)

Definition at line 164 of file ieee754int.h.

#define SETANDTESTCX (   x)    (SETCX(x), ieee754_csr.mx & (x))

Definition at line 65 of file ieee754int.h.

#define SETCX (   x)    (ieee754_csr.cx |= (x), ieee754_csr.sx |= (x))

Definition at line 62 of file ieee754int.h.

#define SP_EBIAS   127

Definition at line 35 of file ieee754int.h.

#define SP_EMAX   127

Definition at line 37 of file ieee754int.h.

#define SP_EMIN   (-126)

Definition at line 36 of file ieee754int.h.

#define SP_HIDDEN_BIT   SP_MBIT(SP_MBITS)

Definition at line 45 of file ieee754int.h.

#define SP_MBIT (   x)    ((u32)1 << (x))

Definition at line 44 of file ieee754int.h.

#define SP_MBITS   23

Definition at line 38 of file ieee754int.h.

#define SP_SIGN_BIT   SP_MBIT(31)

Definition at line 46 of file ieee754int.h.

#define SPBEXP (   sp)    (sp.parts.bexp)

Definition at line 50 of file ieee754int.h.

#define SPMANT (   sp)    (sp.parts.mant)

Definition at line 51 of file ieee754int.h.

#define SPSIGN (   sp)    (sp.parts.sign)

Definition at line 49 of file ieee754int.h.

#define TSTX ( )    (ieee754_csr.cx & ieee754_csr.mx)

Definition at line 68 of file ieee754int.h.