float64 HELPER(vfp_mulxd)(float64 a, float64 b, void *fpstp) { float_status *fpst = fpstp; a = float64_squash_input_denormal(a, fpst); b = float64_squash_input_denormal(b, fpst); if ((float64_is_zero(a) && float64_is_infinity(b)) || (float64_is_infinity(a) && float64_is_zero(b))) { /* 2.0 with the sign bit set to sign(A) XOR sign(B) */ return make_float64((1ULL << 62) | ((float64_val(a) ^ float64_val(b)) & (1ULL << 63))); } return float64_mul(a, b, fpst); }
uint32_t set_cc_nz_f64(float64 v) { if (float64_is_any_nan(v)) { return 3; } else if (float64_is_zero(v)) { return 0; } else if (float64_is_neg(v)) { return 1; } else { return 2; } }
/* test data class 64-bit */ uint32_t HELPER(tcdb)(CPUS390XState *env, uint32_t f1, uint64_t m2) { float64 v1 = env->fregs[f1].d; int neg = float64_is_neg(v1); uint32_t cc = 0; HELPER_LOG("%s: v1 0x%lx m2 0x%lx neg %d\n", __func__, v1, m2, neg); if ((float64_is_zero(v1) && (m2 & (1 << (11-neg)))) || (float64_is_infinity(v1) && (m2 & (1 << (5-neg)))) || (float64_is_any_nan(v1) && (m2 & (1 << (3-neg)))) || (float64_is_signaling_nan(v1) && (m2 & (1 << (1-neg))))) { cc = 1; } else if (m2 & (1 << (9-neg))) { /* assume normalized number */ cc = 1; } /* FIXME: denormalized? */ return cc; }