--- nono/fpe/fpu_emulate.c 2026/04/29 17:04:28 1.1.1.1 +++ nono/fpe/fpu_emulate.c 2026/04/29 17:05:08 1.1.1.2 @@ -507,73 +507,6 @@ fpu_emul_fmovm(struct fpemu *fe, struct } #endif /* !XM6i_FPE */ -struct fpn * -fpu_cmp(struct fpemu *fe) -{ - struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2; - - /* take care of special cases */ - if (x->fp_class < 0) { - /* if x is a SNAN, result is x */ - return x; - } else if (y->fp_class < 0) { - /* if y is a SNAN, result is y */ - return y; - } else if (x->fp_class == FPC_INF) { - if (y->fp_class == FPC_INF) { - /* both infinities */ - if (x->fp_sign == y->fp_sign) { - /* return a signed zero */ - x->fp_class = FPC_ZERO; - } else { - /* return a faked number w/x's sign */ - x->fp_class = FPC_NUM; - x->fp_exp = 16383; - x->fp_mant[0] = FP_1; - } - } else { - /* y is a number */ - /* return a forged number w/x's sign */ - x->fp_class = FPC_NUM; - x->fp_exp = 16383; - x->fp_mant[0] = FP_1; - } - } else if (y->fp_class == FPC_INF) { - /* x is a Num but y is an Inf */ - /* return a forged number w/y's sign inverted */ - x->fp_class = FPC_NUM; - x->fp_sign = !y->fp_sign; - x->fp_exp = 16383; - x->fp_mant[0] = FP_1; - } else if (x->fp_class == FPC_ZERO && y->fp_class == FPC_ZERO) { - /* use x's sign */ - } else if (x->fp_sign == y->fp_sign && - x->fp_exp == y->fp_exp && - x->fp_mant[0] == y->fp_mant[0] && - x->fp_mant[1] == y->fp_mant[1] && - x->fp_mant[2] == y->fp_mant[2]) { - /* x and y are the same, return zero (with sign) */ - x->fp_class = FPC_ZERO; - } else { - /* - * x and y are both numbers, - * or pair of a number and a zero - */ - y->fp_sign = !y->fp_sign; - x = fpu_add(fe); /* (x - y) */ - /* - * FCMP does not set Inf bit in CC, so return a forged number - * (value doesn't matter) if Inf is the result of fsub. - */ - if (x->fp_class == FPC_INF) { - x->fp_class = FPC_NUM; - x->fp_exp = 16383; - x->fp_mant[0] = FP_1; - } - } - return x; -} - #if defined(XM6i_FPE) struct fpn * fpu_sglmul(struct fpemu *fe)