Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
itgen.c File Reference
#include <stdio.h>
#include <math.h>
#include <signal.h>
#include "arith.internal.h"
Include dependency graph for itgen.c:

Go to the source code of this file.

Defines

#define uint32   unsigned long
#define float64   double
#define float32   float
#define sqrt64   sqrt
#define log64   log
#define exp64   exp
#define pow64   pow
#define V(sign, expo, c0, c1)   ((uint32)(sign)<<31) | ((uint32)(expo)<<20) | (c0), (c1),
#define V(sign, expo, coeff)   ((uint32)(sign)<<31) | ((uint32)(expo)<<23) | (coeff),
#define U   "_sunOS"

Functions

void fperr (int sig)
int matherr (struct exception *X)
static float64 fadd64 (float64 x, float64 y)
static float64 fsub64 (float64 x, float64 y)
static float64 fmul64 (float64 x, float64 y)
static float64 fdiv64 (float64 x, float64 y)
static float64 fcmp64 (float64 x, float64 y)
static float32 fadd32 (float32 x, float32 y)
static float32 fsub32 (float32 x, float32 y)
static float32 fmul32 (float32 x, float32 y)
static float32 fdiv32 (float32 x, float32 y)
static float32 fcmp32 (float32 x, float32 y)
static float64 f32to64 (float32 x)
static float32 f64to32 (float64 x)
static prieee64 (FILE *fp, float64 val)
static prieee32 (FILE *fp, float32 val)
static setstat64 (float64 val)
static setstat32 (float32 val)
 dotest64_2 (char *fn, float64(*op)(float64, float64))
 dotest64_2c (char *fn, void(*op)(float64 *, float64 *, float64 *))
 dotest64_1 (char *fn, float64(*op)(float64))
 dotest64_1s (char *fn, float64(*op)(float32))
 dotest32_2 (char *fn, float32(*op)(float32, float32))
 dotest32_2c (char *fn, void(*op)(float32 *, float32 *, float32 *))
 dotest32_1s (char *fn, float32(*op)(float64))
 main ()

Variables

static volatile int fp_error = AR_STAT_OK
static uint32 t64vals []
static uint32 t32vals []
static char USMID [] = "\n%Z%%M% %I% %G% %U%\n"
static char rcsid [] = "$Id: itgen.c,v 1.1.1.1 2002-05-22 20:06:19 dsystem Exp $"

Define Documentation

#define exp64   exp

Definition at line 46 of file itgen.c.

Referenced by main().

#define float32   float

Definition at line 43 of file itgen.c.

Referenced by dotest32_1s(), dotest32_2(), dotest32_2c(), dotest64_1s(), prieee32(), and setstat32().

#define float64   double

Definition at line 42 of file itgen.c.

Referenced by dotest32_1s(), dotest64_1(), dotest64_1s(), dotest64_2(), dotest64_2c(), prieee64(), and setstat64().

#define log64   log

Definition at line 45 of file itgen.c.

Referenced by main().

#define pow64   pow

Definition at line 47 of file itgen.c.

Referenced by main().

#define sqrt64   sqrt

Definition at line 44 of file itgen.c.

Referenced by main().

#define U   "_sunOS"
#define uint32   unsigned long

Definition at line 41 of file itgen.c.

#define V (   sign,
  expo,
  c0,
  c1 
)    ((uint32)(sign)<<31) | ((uint32)(expo)<<20) | (c0), (c1),

Definition at line 118 of file itgen.c.

#define V (   sign,
  expo,
  coeff 
)    ((uint32)(sign)<<31) | ((uint32)(expo)<<23) | (coeff),

Definition at line 118 of file itgen.c.


Function Documentation

dotest32_1s ( char *  fn,
float32(*)(float64 op 
)

Definition at line 527 of file itgen.c.

References AR_STAT_OK, exit(), float32, float64, fp, fp_error, fprintf(), prieee32(), prieee64(), setstat32(), and t64vals.

Referenced by main().

Here is the call graph for this function:

dotest32_2 ( char *  fn,
float32(*)(float32, float32 op 
)

Definition at line 448 of file itgen.c.

References AR_STAT_OK, exit(), float32, fp, fp_error, fprintf(), prieee32(), setstat32(), and t32vals.

Referenced by main().

Here is the call graph for this function:

dotest32_2c ( char *  fn,
void(*)(float32 *, float32 *, float32 *)  op 
)

Definition at line 481 of file itgen.c.

References AR_STAT_INVALID_TYPE, AR_STAT_OK, AR_STAT_OVERFLOW, AR_STAT_UNDEFINED, AR_STAT_UNDERFLOW, AR_STAT_ZERO, exit(), float32, fp, fp_error, fprintf(), prieee32(), setstat32(), and t32vals.

Referenced by main().

Here is the call graph for this function:

dotest64_1 ( char *  fn,
float64(*)(float64 op 
)

Definition at line 390 of file itgen.c.

References AR_STAT_OK, exit(), float64, fp, fp_error, fprintf(), prieee64(), setstat64(), and t64vals.

Here is the call graph for this function:

dotest64_1s ( char *  fn,
float64(*)(float32 op 
)

Definition at line 419 of file itgen.c.

References AR_STAT_OK, exit(), float32, float64, fp, fp_error, fprintf(), prieee32(), prieee64(), setstat64(), and t32vals.

Referenced by main().

Here is the call graph for this function:

dotest64_2 ( char *  fn,
float64(*)(float64, float64 op 
)

Definition at line 307 of file itgen.c.

References AR_STAT_OK, exit(), float64, fp, fp_error, fprintf(), prieee64(), setstat64(), and t64vals.

Here is the call graph for this function:

dotest64_2c ( char *  fn,
void(*)(float64 *, float64 *, float64 *)  op 
)

Definition at line 342 of file itgen.c.

References AR_STAT_INVALID_TYPE, AR_STAT_OK, AR_STAT_OVERFLOW, AR_STAT_UNDEFINED, AR_STAT_UNDERFLOW, AR_STAT_ZERO, exit(), float64, fp, fp_error, fprintf(), prieee64(), setstat64(), and t64vals.

Referenced by main().

Here is the call graph for this function:

static float64 f32to64 ( float32  x) [static]

Definition at line 243 of file itgen.c.

Referenced by main().

static float32 f64to32 ( float64  x) [static]

Definition at line 249 of file itgen.c.

Referenced by main().

static float32 fadd32 ( float32  x,
float32  y 
) [static]

Definition at line 205 of file itgen.c.

Referenced by main().

static float64 fadd64 ( float64  x,
float64  y 
) [static]

Definition at line 167 of file itgen.c.

Referenced by main().

static float32 fcmp32 ( float32  x,
float32  y 
) [static]

Definition at line 229 of file itgen.c.

References AR_STAT_UNDEFINED, and fp_error.

Referenced by main().

static float64 fcmp64 ( float64  x,
float64  y 
) [static]

Definition at line 191 of file itgen.c.

References AR_STAT_UNDEFINED, and fp_error.

Referenced by main().

static float32 fdiv32 ( float32  x,
float32  y 
) [static]

Definition at line 223 of file itgen.c.

Referenced by main().

static float64 fdiv64 ( float64  x,
float64  y 
) [static]

Definition at line 185 of file itgen.c.

Referenced by main().

static float32 fmul32 ( float32  x,
float32  y 
) [static]

Definition at line 217 of file itgen.c.

Referenced by main().

static float64 fmul64 ( float64  x,
float64  y 
) [static]

Definition at line 179 of file itgen.c.

Referenced by main().

void fperr ( int  sig)

Definition at line 57 of file itgen.c.

References AR_STAT_UNDEFINED, fp_error, and fperr().

Here is the call graph for this function:

static float32 fsub32 ( float32  x,
float32  y 
) [static]

Definition at line 211 of file itgen.c.

Referenced by main().

static float64 fsub64 ( float64  x,
float64  y 
) [static]

Definition at line 173 of file itgen.c.

Referenced by main().

int matherr ( struct exception *  X)

Definition at line 65 of file itgen.c.

static prieee32 ( FILE *  fp,
float32  val 
) [static]

Definition at line 266 of file itgen.c.

References float32, fprintf(), and val.

Here is the call graph for this function:

static prieee64 ( FILE *  fp,
float64  val 
) [static]

Definition at line 255 of file itgen.c.

References float64, fprintf(), and val.

Here is the call graph for this function:

static setstat32 ( float32  val) [static]
static setstat64 ( float64  val) [static]

Variable Documentation

char rcsid[] = "$Id: itgen.c,v 1.1.1.1 2002-05-22 20:06:19 dsystem Exp $" [static]

Definition at line 591 of file itgen.c.

uint32 t32vals[] [static]

Definition at line 120 of file itgen.c.

Referenced by dotest32_2(), dotest32_2c(), and dotest64_1s().

uint32 t64vals[] [static]

Definition at line 73 of file itgen.c.

Referenced by dotest32_1s(), dotest64_1(), dotest64_2(), and dotest64_2c().

char USMID[] = "\n%Z%%M% %I% %G% %U%\n" [static]

Definition at line 590 of file itgen.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines