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

Go to the source code of this file.

Defines

#define MAX_DOPE_VECTOR_WORDS   32
#define CRAY_FLOAT_64   (UNROUNDED_TYPE(AR_Float_Cray1_64))
#define CRAY_FLOAT_128   (UNROUNDED_TYPE(AR_Float_Cray1_128))
#define CRAY_COMPLEX_64   (UNROUNDED_TYPE(AR_Complex_Cray1_64))
#define CRAY_COMPLEX_128   (UNROUNDED_TYPE(AR_Complex_Cray1_128))
#define IEEE_FLOAT_32   (UNROUNDED_TYPE(AR_Float_IEEE_NR_32))
#define IEEE_FLOAT_64   (UNROUNDED_TYPE(AR_Float_IEEE_NR_64))
#define IEEE_FLOAT_128   (UNROUNDED_TYPE(AR_Float_IEEE_NR_128))
#define IEEE_COMPLEX_32   (UNROUNDED_TYPE(AR_Complex_IEEE_NR_32))
#define IEEE_COMPLEX_64   (UNROUNDED_TYPE(AR_Complex_IEEE_NR_64))
#define IEEE_COMPLEX_128   (UNROUNDED_TYPE(AR_Complex_IEEE_NR_128))
#define MODESP   000 /* Single-precision (64-bit) flag */
#define MODEDP   004 /* Double-precision (128-bit) flag */
#define MODEHP   020 /* Half-precision (32-bit) flag */
#define EX_REAL64   3 /* 64-bit real */
#define EX_REAL128   4 /* 128-bit real */
#define EX_REAL32   5 /* 32-bit real */
#define EX_ILLCHAR   -1 /* invalid character */
#define EX_EXPUFLO   -3 /* floating-point underflow */
#define EX_EXPOFLO   -4 /* floating-point overflow */
#define EX_NULLFLD   -5 /* null field (no digits) */

Functions

int ar_ext_address (AR_INT_64 *intaddr, const void *extaddr, int nwords)
int ar_pass_arg_address (const ar_data *arg, const AR_TYPE *argtype)
int ar_pass_ext_address (AR_INT_64 *intaddr, const void *extaddr, int nwords)
int ar_pass_fcd_address (const char *str, long lenstr)
int ar_pass_arg_value (const ar_data *arg, const AR_TYPE *argtype)
int ar_put_real_address (AR_INT_64 *intaddr)
int ar_get_function_value (ar_data *result, const AR_TYPE *resulttype)
int ar_sim (char *function_name)
int ar_index (ar_data *result, const AR_TYPE *resulttype, const char *str1, long len1, const char *str2, long len2, long backward)
int ar_scan (ar_data *result, const AR_TYPE *resulttype, const char *str1, long len1, const char *str2, long len2, long backward)
int ar_verify (ar_data *result, const AR_TYPE *resulttype, const char *str1, long len1, const char *str2, long len2, long backward)
int ar_reshape (void *result, const void *source, const void *shape, const void *pad, const void *order)
int ar_transfer (void *result, const void *source, const void *mold, long *size)
int ar_modulo (ar_data *result, const AR_TYPE *resulttype, const ar_data *opnd1, const AR_TYPE *opnd1type, const ar_data *opnd2, const AR_TYPE *opnd2type)
int ar_selected_real_kind (ar_data *result, const AR_TYPE *resulttype, const ar_data *opnd1, const AR_TYPE *opnd1type, const ar_data *opnd2, const AR_TYPE *opnd2type)
int ar_sqrt (ar_data *result, const AR_TYPE *resulttype, const ar_data *opnd, const AR_TYPE *opndtype)
int ar_log (ar_data *result, const AR_TYPE *resulttype, const ar_data *opnd, const AR_TYPE *opndtype)
int ar_exp (ar_data *result, const AR_TYPE *resulttype, const ar_data *opnd, const AR_TYPE *opndtype)
int ar_cabs (ar_data *result, const AR_TYPE *resulttype, const ar_data *opnd, const AR_TYPE *opndtype)
int ar_power (ar_data *result, const AR_TYPE *resulttype, const ar_data *base, const AR_TYPE *basetype, const ar_data *power, const AR_TYPE *powertype)
int ar_convert_str_to_float (ar_data *result, const AR_TYPE *resulttype, const char *str)
int ar_divide_complex (ar_data *result, const AR_TYPE *resulttype, const ar_data *opnd1, const AR_TYPE *opnd1type, const ar_data *opnd2, const AR_TYPE *opnd2type)

Variables

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

Define Documentation

Definition at line 48 of file simulate.c.

Referenced by ar_exp(), ar_log(), ar_power(), and ar_sqrt().

Definition at line 47 of file simulate.c.

Referenced by ar_exp(), ar_log(), ar_power(), and ar_sqrt().

Definition at line 46 of file simulate.c.

Referenced by ar_cabs(), ar_exp(), ar_log(), ar_modulo(), ar_power(), and ar_sqrt().

Definition at line 45 of file simulate.c.

Referenced by ar_cabs(), ar_exp(), ar_log(), ar_modulo(), ar_power(), and ar_sqrt().

#define EX_EXPOFLO   -4 /* floating-point overflow */

Definition at line 842 of file simulate.c.

Referenced by _nicverr(), ar_convert_str_to_float(), and ar_cvt_str_to_float().

#define EX_EXPUFLO   -3 /* floating-point underflow */

Definition at line 841 of file simulate.c.

Referenced by _nicverr(), ar_convert_str_to_float(), and ar_cvt_str_to_float().

#define EX_ILLCHAR   -1 /* invalid character */

Definition at line 840 of file simulate.c.

Referenced by _nicverr().

#define EX_NULLFLD   -5 /* null field (no digits) */

Definition at line 843 of file simulate.c.

Referenced by _nicverr().

#define EX_REAL128   4 /* 128-bit real */

Definition at line 838 of file simulate.c.

Referenced by _g_number(), ar_convert_str_to_float(), and ar_cvt_str_to_float().

#define EX_REAL32   5 /* 32-bit real */

Definition at line 839 of file simulate.c.

Referenced by _g_number(), ar_convert_str_to_float(), and ar_cvt_str_to_float().

#define EX_REAL64   3 /* 64-bit real */

Definition at line 837 of file simulate.c.

Referenced by _g_number(), ar_convert_str_to_float(), and ar_cvt_str_to_float().

Definition at line 55 of file simulate.c.

Referenced by ar_exp(), ar_log(), ar_power(), and ar_sqrt().

Definition at line 53 of file simulate.c.

Referenced by ar_exp(), ar_log(), ar_power(), and ar_sqrt().

Definition at line 54 of file simulate.c.

Referenced by ar_exp(), ar_log(), ar_power(), and ar_sqrt().

Definition at line 52 of file simulate.c.

Referenced by ar_cabs(), ar_exp(), ar_log(), ar_modulo(), ar_power(), and ar_sqrt().

Definition at line 51 of file simulate.c.

Referenced by ar_cabs(), ar_exp(), ar_log(), ar_modulo(), ar_power(), and ar_sqrt().

#define MAX_DOPE_VECTOR_WORDS   32

Definition at line 43 of file simulate.c.

Referenced by ar_reshape(), and ar_transfer().

#define MODEDP   004 /* Double-precision (128-bit) flag */
#define MODEHP   020 /* Half-precision (32-bit) flag */
#define MODESP   000 /* Single-precision (64-bit) flag */

Definition at line 831 of file simulate.c.

Referenced by ar_convert_str_to_float(), and ar_cvt_str_to_float().


Function Documentation

int ar_cabs ( ar_data result,
const AR_TYPE resulttype,
const ar_data opnd,
const AR_TYPE opndtype 
)
int ar_divide_complex ( ar_data result,
const AR_TYPE resulttype,
const ar_data opnd1,
const AR_TYPE opnd1type,
const ar_data opnd2,
const AR_TYPE opnd2type 
)

Definition at line 988 of file simulate.c.

References AR_add(), ar_compose_complex(), ar_decompose_complex(), AR_divide(), AR_multiply(), AR_STAT_NEGATIVE, AR_STAT_ZERO, AR_status(), AR_subtract(), c, and d.

Here is the call graph for this function:

int ar_ext_address ( AR_INT_64 intaddr,
const void *  extaddr,
int  nwords 
)
int ar_get_function_value ( ar_data result,
const AR_TYPE resulttype 
)
int ar_index ( ar_data result,
const AR_TYPE resulttype,
const char *  str1,
long  len1,
const char *  str2,
long  len2,
long  backward 
)
int ar_modulo ( ar_data result,
const AR_TYPE resulttype,
const ar_data opnd1,
const AR_TYPE opnd1type,
const ar_data opnd2,
const AR_TYPE opnd2type 
)
int ar_pass_ext_address ( AR_INT_64 intaddr,
const void *  extaddr,
int  nwords 
)
int ar_reshape ( void *  result,
const void *  source,
const void *  shape,
const void *  pad,
const void *  order 
)
int ar_scan ( ar_data result,
const AR_TYPE resulttype,
const char *  str1,
long  len1,
const char *  str2,
long  len2,
long  backward 
)
int ar_selected_real_kind ( ar_data result,
const AR_TYPE resulttype,
const ar_data opnd1,
const AR_TYPE opnd1type,
const ar_data opnd2,
const AR_TYPE opnd2type 
)
int ar_sim ( char *  function_name)

Definition at line 686 of file cray1_sim.c.

References A, ADD64, AMASK, ar_c1frecip(), ar_cfadd64(), ar_cfmul64(), ar_cfsub64(), ar_check_status(), AR_compare(), AR_Compare_EQ, AR_Compare_GT, AR_Compare_LT, AR_Compare_Unord, ar_convert_to_float(), AR_CRAY_FLOATING_POINT, AR_ERROR_STATUS, ar_ext_address(), ar_state_info::ar_float_format, AR_Float_IEEE_NR_32, AR_Float_IEEE_ZE_32, AR_IEEE_FLOATING_POINT, ar_ifadd64(), ar_ifcmp64(), ar_ifdiv64(), ar_ifix64(), ar_iflt64(), ar_ifmul64(), ar_ifsub64(), ar_imul64u(), ar_internal_error(), ar_isqrt64(), ar_mach_type, AR_RECIPROCAL_ITERATION, AR_ROUND_NEAREST, AR_ROUND_ZERO, AR_ROUNDED, ar_state_info::ar_rounding_mode, ar_sim_version, ar_sqrt(), AR_STAT_NEGATIVE, AR_STAT_OK, AR_STAT_OVERFLOW, AR_STAT_UNDEFINED, AR_STAT_ZERO, ar_state_register, ar_state_info::ar_truncate_bits, AR_UNROUNDED, i64_union::ari64, ARITHERR, ASB, B, BADINSTR, call_host_external(), ci, code, COPY64, D_float_32, D_roundmode, DISASM0, DISASM1, DISASM2, DISASM3, DISASM4, DISASM5, DISASMB, DISASMT, DISASMV, errno, EXTERROR, fp, fzero, getp1, HOSTEXT, ieee_float_32, ieee_float_64, IFACEERR, Internal, INTERRUPT_DIV, INTERRUPT_INP, INTERRUPT_INV, INTERRUPT_INX, INTERRUPT_OVF, INTERRUPT_UNF, IS_ERROR_STATUS, JSZP, i64_union::l64, load_mpp_word(), load_pvp_word(), MPP_DSIB_SIZE, MPP_STACK_SIZE, name, NEG64, NOINTRIN, NOT64, numargs, numargwds, one, p1, p2, AR_INT_64::part1, AR_INT_64::part2, AR_INT_64::part3, AR_INT_64::part4, prefix_check, PRINTMSG(), ret, RMMASK, S, s0, SETERRNO, SHLEFT64, SHLEFT64N, SHRIGHT64, SHRIGHT64N, sp, SR0, STACK, stack_segment_id, STACK_SIZE, store_mpp_word(), store_pvp_word(), T, t1, T3D, T3E_DSIB_LOC, T90, UNIMPL_INST, UNIMPL_PRFX, V, v0, VL, VM, VM1, VSZ, zero, and ZERO64.

Referenced by ar_cabs(), ar_convert_str_to_float(), ar_exp(), ar_index(), ar_log(), ar_modulo(), ar_power(), ar_reshape(), ar_scan(), ar_selected_real_kind(), ar_sqrt(), ar_transfer(), and ar_verify().

Here is the call graph for this function:

int ar_transfer ( void *  result,
const void *  source,
const void *  mold,
long *  size 
)
int ar_verify ( ar_data result,
const AR_TYPE resulttype,
const char *  str1,
long  len1,
const char *  str2,
long  len2,
long  backward 
)

Variable Documentation

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

Definition at line 1081 of file simulate.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines