--- tme/ic/ieee754/ieee754-ops-auto.c 2018/04/24 16:40:26 1.1 +++ tme/ic/ieee754/ieee754-ops-auto.c 2018/04/24 16:44:00 1.1.1.3 @@ -1,6 +1,6 @@ /* automatically generated by ieee754-ops-auto.sh, do not edit! */ #include -_TME_RCSID("$Id: ieee754-ops-auto.c,v 1.1 2018/04/24 16:40:26 root Exp $"); +_TME_RCSID("$Id: ieee754-ops-auto.c,v 1.1.1.3 2018/04/24 16:44:00 root Exp $"); #include "softfloat-tme.h" #include @@ -225,7 +225,7 @@ _tme_ieee754_strict_single_neg(struct tm /* the operation: */ _tme_ieee754_single_value_set(dst, float32, - float32_sub(int32_to_float32(0), + float32_mul(int32_to_float32(-1), (*((const float32 *) tme_ieee754_single_value_get(src0, &src0_buffer))))); /* leave softfloat operation: */ @@ -488,6 +488,72 @@ _tme_ieee754_strict_single_from_quad(str } } +/* this does a strict compliance single-precision from-int32: */ +static void +_tme_ieee754_strict_single_from_int32(struct tme_ieee754_ctl *ieee754_ctl, const tme_int32_t src0, struct tme_float *dst) +{ + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + _tme_ieee754_single_value_set(dst, float32, + int32_to_float32(src0)); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#if defined(TME_HAVE_INT64_T) + +/* this does a strict compliance single-precision from-int64: */ +static void +_tme_ieee754_strict_single_from_int64(struct tme_ieee754_ctl *ieee754_ctl, const tme_int64_t src0, struct tme_float *dst) +{ + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + _tme_ieee754_single_value_set(dst, float32, + int64_to_float32(src0)); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + /* this does a strict compliance single-precision to-int32: */ static void _tme_ieee754_strict_single_to_int32(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, tme_int32_t *dst) @@ -519,6 +585,41 @@ _tme_ieee754_strict_single_to_int32(stru } } +#if defined(TME_HAVE_INT64_T) + +/* this does a strict compliance single-precision to-int64: */ +static void +_tme_ieee754_strict_single_to_int64(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, tme_int64_t *dst) +{ + tme_uint32_t src0_buffer; + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + *dst = float32_to_int64((*((const float32 *) tme_ieee754_single_value_get(src0, &src0_buffer)))); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + /* this does a strict compliance double-precision add: */ static void _tme_ieee754_strict_double_add(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, const struct tme_float *src1, struct tme_float *dst) @@ -739,7 +840,7 @@ _tme_ieee754_strict_double_neg(struct tm /* the operation: */ _tme_ieee754_double_value_set(dst, float64, - float64_sub(int32_to_float64(0), + float64_mul(int32_to_float64(-1), (*((const float64 *) tme_ieee754_double_value_get(src0, &src0_buffer))))); /* leave softfloat operation: */ @@ -1002,6 +1103,72 @@ _tme_ieee754_strict_double_from_quad(str } } +/* this does a strict compliance double-precision from-int32: */ +static void +_tme_ieee754_strict_double_from_int32(struct tme_ieee754_ctl *ieee754_ctl, const tme_int32_t src0, struct tme_float *dst) +{ + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + _tme_ieee754_double_value_set(dst, float64, + int32_to_float64(src0)); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#if defined(TME_HAVE_INT64_T) + +/* this does a strict compliance double-precision from-int64: */ +static void +_tme_ieee754_strict_double_from_int64(struct tme_ieee754_ctl *ieee754_ctl, const tme_int64_t src0, struct tme_float *dst) +{ + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + _tme_ieee754_double_value_set(dst, float64, + int64_to_float64(src0)); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + /* this does a strict compliance double-precision to-int32: */ static void _tme_ieee754_strict_double_to_int32(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, tme_int32_t *dst) @@ -1035,6 +1202,41 @@ _tme_ieee754_strict_double_to_int32(stru #if defined(TME_HAVE_INT64_T) +/* this does a strict compliance double-precision to-int64: */ +static void +_tme_ieee754_strict_double_to_int64(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, tme_int64_t *dst) +{ + union tme_value64 src0_buffer; + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + *dst = float64_to_int64((*((const float64 *) tme_ieee754_double_value_get(src0, &src0_buffer)))); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + +#if defined(TME_HAVE_INT64_T) + /* this does a strict compliance extended80-precision add: */ static void _tme_ieee754_strict_extended80_add(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, const struct tme_float *src1, struct tme_float *dst) @@ -1279,7 +1481,7 @@ _tme_ieee754_strict_extended80_neg(struc /* the operation: */ _tme_ieee754_extended80_value_set(dst, floatx80, - floatx80_sub(int32_to_floatx80(0), + floatx80_mul(int32_to_floatx80(-1), (*((const floatx80 *) tme_ieee754_extended80_value_get(src0, &src0_buffer))))); /* leave softfloat operation: */ @@ -1564,6 +1766,76 @@ _tme_ieee754_strict_extended80_from_quad #endif /* defined(TME_HAVE_INT64_T) */ +#if defined(TME_HAVE_INT64_T) + +/* this does a strict compliance extended80-precision from-int32: */ +static void +_tme_ieee754_strict_extended80_from_int32(struct tme_ieee754_ctl *ieee754_ctl, const tme_int32_t src0, struct tme_float *dst) +{ + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + _tme_ieee754_extended80_value_set(dst, floatx80, + int32_to_floatx80(src0)); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + +#if defined(TME_HAVE_INT64_T) + +/* this does a strict compliance extended80-precision from-int64: */ +static void +_tme_ieee754_strict_extended80_from_int64(struct tme_ieee754_ctl *ieee754_ctl, const tme_int64_t src0, struct tme_float *dst) +{ + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + _tme_ieee754_extended80_value_set(dst, floatx80, + int64_to_floatx80(src0)); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + /* this does a strict compliance extended80-precision to-int32: */ static void _tme_ieee754_strict_extended80_to_int32(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, tme_int32_t *dst) @@ -1597,6 +1869,41 @@ _tme_ieee754_strict_extended80_to_int32( #if defined(TME_HAVE_INT64_T) +/* this does a strict compliance extended80-precision to-int64: */ +static void +_tme_ieee754_strict_extended80_to_int64(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, tme_int64_t *dst) +{ + struct tme_float_ieee754_extended80 src0_buffer; + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + *dst = floatx80_to_int64((*((const floatx80 *) tme_ieee754_extended80_value_get(src0, &src0_buffer)))); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + +#if defined(TME_HAVE_INT64_T) + /* this does a strict compliance quad-precision add: */ static void _tme_ieee754_strict_quad_add(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, const struct tme_float *src1, struct tme_float *dst) @@ -1841,7 +2148,7 @@ _tme_ieee754_strict_quad_neg(struct tme_ /* the operation: */ _tme_ieee754_quad_value_set(dst, float128, - float128_sub(int32_to_float128(0), + float128_mul(int32_to_float128(-1), (*((const float128 *) tme_ieee754_quad_value_get(src0, &src0_buffer))))); /* leave softfloat operation: */ @@ -2126,6 +2433,76 @@ _tme_ieee754_strict_quad_from_extended80 #endif /* defined(TME_HAVE_INT64_T) */ +#if defined(TME_HAVE_INT64_T) + +/* this does a strict compliance quad-precision from-int32: */ +static void +_tme_ieee754_strict_quad_from_int32(struct tme_ieee754_ctl *ieee754_ctl, const tme_int32_t src0, struct tme_float *dst) +{ + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + _tme_ieee754_quad_value_set(dst, float128, + int32_to_float128(src0)); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + +#if defined(TME_HAVE_INT64_T) + +/* this does a strict compliance quad-precision from-int64: */ +static void +_tme_ieee754_strict_quad_from_int64(struct tme_ieee754_ctl *ieee754_ctl, const tme_int64_t src0, struct tme_float *dst) +{ + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + _tme_ieee754_quad_value_set(dst, float128, + int64_to_float128(src0)); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + /* this does a strict compliance quad-precision to-int32: */ static void _tme_ieee754_strict_quad_to_int32(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, tme_int32_t *dst) @@ -2157,6 +2534,41 @@ _tme_ieee754_strict_quad_to_int32(struct } } +#if defined(TME_HAVE_INT64_T) + +/* this does a strict compliance quad-precision to-int64: */ +static void +_tme_ieee754_strict_quad_to_int64(struct tme_ieee754_ctl *ieee754_ctl, const struct tme_float *src0, tme_int64_t *dst) +{ + struct tme_float_ieee754_quad src0_buffer; + int exceptions; + + /* enter softfloat operation: */ + tme_mutex_lock(&tme_ieee754_global_mutex); + tme_ieee754_global_ctl = ieee754_ctl; + tme_ieee754_global_exceptions = 0; + ieee754_ctl->tme_ieee754_ctl_lock_unlock = tme_ieee754_unlock_softfloat; + + /* assume that this operation raises no exceptions: */ + exceptions = 0; + + /* the operation: */ + *dst = float128_to_int64((*((const float128 *) tme_ieee754_quad_value_get(src0, &src0_buffer)))); + + /* leave softfloat operation: */ + tme_ieee754_global_ctl = NULL; + exceptions |= tme_ieee754_global_exceptions; + tme_mutex_unlock(&tme_ieee754_global_mutex); + ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; + + /* signal any exceptions: */ + if (exceptions != 0) { + (*ieee754_ctl->tme_ieee754_ctl_exception)(ieee754_ctl, exceptions); + } +} + +#endif /* defined(TME_HAVE_INT64_T) */ + /* the strict compliance operations: */ _tme_const struct tme_ieee754_ops tme_ieee754_ops_strict = { @@ -2259,11 +2671,25 @@ _tme_const struct tme_ieee754_ops tme_ie /* this does a strict compliance single-precision from_quad: */ _tme_ieee754_strict_single_from_quad, + /* this does a strict compliance single-precision from_int32: */ + _tme_ieee754_strict_single_from_int32, + + /* this does a strict compliance single-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_single_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a strict compliance single-precision to_int32: */ _tme_ieee754_strict_single_to_int32, /* this does a strict compliance single-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_single_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ /* this does a strict compliance double-precision add: */ _tme_ieee754_strict_double_add, @@ -2361,11 +2787,25 @@ _tme_const struct tme_ieee754_ops tme_ie /* this does a strict compliance double-precision from_quad: */ _tme_ieee754_strict_double_from_quad, + /* this does a strict compliance double-precision from_int32: */ + _tme_ieee754_strict_double_from_int32, + + /* this does a strict compliance double-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_double_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a strict compliance double-precision to_int32: */ _tme_ieee754_strict_double_to_int32, /* this does a strict compliance double-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_double_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ /* this does a strict compliance extended80-precision add: */ #if (defined(TME_HAVE_INT64_T)) @@ -2511,11 +2951,29 @@ _tme_const struct tme_ieee754_ops tme_ie NULL, #endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a strict compliance extended80-precision from_int32: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_extended80_from_int32, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + + /* this does a strict compliance extended80-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_extended80_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a strict compliance extended80-precision to_int32: */ _tme_ieee754_strict_extended80_to_int32, /* this does a strict compliance extended80-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_extended80_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ /* this does a strict compliance quad-precision add: */ #if (defined(TME_HAVE_INT64_T)) @@ -2661,11 +3119,29 @@ _tme_const struct tme_ieee754_ops tme_ie NULL, #endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a strict compliance quad-precision from_int32: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_quad_from_int32, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + + /* this does a strict compliance quad-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_quad_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a strict compliance quad-precision to_int32: */ _tme_ieee754_strict_quad_to_int32, /* this does a strict compliance quad-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_quad_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ }; #if (TME_FLOAT_FORMAT_IEEE754_SINGLE_BUILTIN == TME_FLOAT_FORMAT_IEEE754_SINGLE) @@ -2907,7 +3383,7 @@ _tme_ieee754_partial_single_neg(struct t exceptions = 0; /* the operation: */ - tme_ieee754_single_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_SINGLE_BUILTIN, 0 - tme_ieee754_single_value_builtin_get(src0)); + tme_ieee754_single_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_SINGLE_BUILTIN, -1 * tme_ieee754_single_value_builtin_get(src0)); /* leave native floating-point operation: */ exceptions |= tme_float_leave(); @@ -3390,7 +3866,7 @@ _tme_ieee754_partial_double_neg(struct t exceptions = 0; /* the operation: */ - tme_ieee754_double_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_DOUBLE_BUILTIN, 0 - tme_ieee754_double_value_builtin_get(src0)); + tme_ieee754_double_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_DOUBLE_BUILTIN, -1 * tme_ieee754_double_value_builtin_get(src0)); /* leave native floating-point operation: */ exceptions |= tme_float_leave(); @@ -3873,7 +4349,7 @@ _tme_ieee754_partial_extended80_neg(stru exceptions = 0; /* the operation: */ - tme_ieee754_extended80_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_EXTENDED80_BUILTIN, 0 - tme_ieee754_extended80_value_builtin_get(src0)); + tme_ieee754_extended80_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_EXTENDED80_BUILTIN, -1 * tme_ieee754_extended80_value_builtin_get(src0)); /* leave native floating-point operation: */ exceptions |= tme_float_leave(); @@ -4356,7 +4832,7 @@ _tme_ieee754_partial_quad_neg(struct tme exceptions = 0; /* the operation: */ - tme_ieee754_quad_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_QUAD_BUILTIN, 0 - tme_ieee754_quad_value_builtin_get(src0)); + tme_ieee754_quad_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_QUAD_BUILTIN, -1 * tme_ieee754_quad_value_builtin_get(src0)); /* leave native floating-point operation: */ exceptions |= tme_float_leave(); @@ -4754,11 +5230,25 @@ _tme_const struct tme_ieee754_ops tme_ie /* this does a partial compliance single-precision from_quad: */ _tme_ieee754_strict_single_from_quad, + /* this does a partial compliance single-precision from_int32: */ + _tme_ieee754_strict_single_from_int32, + + /* this does a partial compliance single-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_single_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a partial compliance single-precision to_int32: */ _tme_ieee754_strict_single_to_int32, /* this does a partial compliance single-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_single_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ /* this does a partial compliance double-precision add: */ #if ((TME_FLOAT_FORMAT_IEEE754_DOUBLE_BUILTIN == TME_FLOAT_FORMAT_IEEE754_DOUBLE)) @@ -4908,11 +5398,25 @@ _tme_const struct tme_ieee754_ops tme_ie /* this does a partial compliance double-precision from_quad: */ _tme_ieee754_strict_double_from_quad, + /* this does a partial compliance double-precision from_int32: */ + _tme_ieee754_strict_double_from_int32, + + /* this does a partial compliance double-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_double_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a partial compliance double-precision to_int32: */ _tme_ieee754_strict_double_to_int32, /* this does a partial compliance double-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_double_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ /* this does a partial compliance extended80-precision add: */ #if ((TME_FLOAT_FORMAT_IEEE754_EXTENDED80_BUILTIN == TME_FLOAT_FORMAT_IEEE754_EXTENDED80)) @@ -5110,11 +5614,29 @@ _tme_const struct tme_ieee754_ops tme_ie NULL, #endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a partial compliance extended80-precision from_int32: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_extended80_from_int32, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + + /* this does a partial compliance extended80-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_extended80_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a partial compliance extended80-precision to_int32: */ _tme_ieee754_strict_extended80_to_int32, /* this does a partial compliance extended80-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_extended80_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ /* this does a partial compliance quad-precision add: */ #if ((TME_FLOAT_FORMAT_IEEE754_QUAD_BUILTIN == TME_FLOAT_FORMAT_IEEE754_QUAD)) @@ -5312,11 +5834,29 @@ _tme_const struct tme_ieee754_ops tme_ie NULL, #endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a partial compliance quad-precision from_int32: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_quad_from_int32, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + + /* this does a partial compliance quad-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_quad_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a partial compliance quad-precision to_int32: */ _tme_ieee754_strict_quad_to_int32, /* this does a partial compliance quad-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_quad_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ }; /* this does a unknown compliance single-precision add: */ @@ -5451,7 +5991,7 @@ _tme_ieee754_unknown_single_neg(struct t exceptions = 0; /* the operation: */ - tme_ieee754_single_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_SINGLE_BUILTIN, 0 - tme_ieee754_single_value_builtin_get(src0)); + tme_ieee754_single_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_SINGLE_BUILTIN, -1 * tme_ieee754_single_value_builtin_get(src0)); ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; /* signal any exceptions: */ @@ -5726,7 +6266,7 @@ _tme_ieee754_unknown_double_neg(struct t exceptions = 0; /* the operation: */ - tme_ieee754_double_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_DOUBLE_BUILTIN, 0 - tme_ieee754_double_value_builtin_get(src0)); + tme_ieee754_double_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_DOUBLE_BUILTIN, -1 * tme_ieee754_double_value_builtin_get(src0)); ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; /* signal any exceptions: */ @@ -6001,7 +6541,7 @@ _tme_ieee754_unknown_extended80_neg(stru exceptions = 0; /* the operation: */ - tme_ieee754_extended80_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_EXTENDED80_BUILTIN, 0 - tme_ieee754_extended80_value_builtin_get(src0)); + tme_ieee754_extended80_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_EXTENDED80_BUILTIN, -1 * tme_ieee754_extended80_value_builtin_get(src0)); ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; /* signal any exceptions: */ @@ -6276,7 +6816,7 @@ _tme_ieee754_unknown_quad_neg(struct tme exceptions = 0; /* the operation: */ - tme_ieee754_quad_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_QUAD_BUILTIN, 0 - tme_ieee754_quad_value_builtin_get(src0)); + tme_ieee754_quad_value_builtin_set(dst, TME_FLOAT_FORMAT_IEEE754_QUAD_BUILTIN, -1 * tme_ieee754_quad_value_builtin_get(src0)); ieee754_ctl->tme_ieee754_ctl_lock_unlock = NULL; /* signal any exceptions: */ @@ -6521,11 +7061,25 @@ _tme_const struct tme_ieee754_ops tme_ie /* this does a unknown compliance single-precision from_quad: */ _tme_ieee754_strict_single_from_quad, + /* this does a unknown compliance single-precision from_int32: */ + _tme_ieee754_strict_single_from_int32, + + /* this does a unknown compliance single-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_single_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a unknown compliance single-precision to_int32: */ _tme_ieee754_strict_single_to_int32, /* this does a unknown compliance single-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_single_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ /* this does a unknown compliance double-precision add: */ _tme_ieee754_unknown_double_add, @@ -6623,11 +7177,25 @@ _tme_const struct tme_ieee754_ops tme_ie /* this does a unknown compliance double-precision from_quad: */ _tme_ieee754_strict_double_from_quad, + /* this does a unknown compliance double-precision from_int32: */ + _tme_ieee754_strict_double_from_int32, + + /* this does a unknown compliance double-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_double_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a unknown compliance double-precision to_int32: */ _tme_ieee754_strict_double_to_int32, /* this does a unknown compliance double-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_double_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ /* this does a unknown compliance extended80-precision add: */ _tme_ieee754_unknown_extended80_add, @@ -6745,11 +7313,29 @@ _tme_const struct tme_ieee754_ops tme_ie NULL, #endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a unknown compliance extended80-precision from_int32: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_extended80_from_int32, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + + /* this does a unknown compliance extended80-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_extended80_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a unknown compliance extended80-precision to_int32: */ _tme_ieee754_strict_extended80_to_int32, /* this does a unknown compliance extended80-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_extended80_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ /* this does a unknown compliance quad-precision add: */ _tme_ieee754_unknown_quad_add, @@ -6867,11 +7453,29 @@ _tme_const struct tme_ieee754_ops tme_ie NULL, #endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a unknown compliance quad-precision from_int32: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_quad_from_int32, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + + /* this does a unknown compliance quad-precision from_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_quad_from_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ + NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ + /* this does a unknown compliance quad-precision to_int32: */ _tme_ieee754_strict_quad_to_int32, /* this does a unknown compliance quad-precision to_int64: */ +#if (defined(TME_HAVE_INT64_T)) + _tme_ieee754_strict_quad_to_int64, +#else /* !(defined(TME_HAVE_INT64_T)) */ NULL, +#endif /* !(defined(TME_HAVE_INT64_T)) */ }; /* this looks up an operations structure: */