| // SPDX-License-Identifier: GPL-2.0-only |
| /* IEEE754 floating point arithmetic |
| * MIPS floating point support |
| * Copyright (C) 1994-2000 Algorithmics Ltd. |
| int ieee754sp_cmp(union ieee754sp x, union ieee754sp y, int cmp, int sig) |
| ieee754_clearcx(); /* Even clear inexact flag here */ |
| if (ieee754_class_nan(xc) || ieee754_class_nan(yc)) { |
| xc == IEEE754_CLASS_SNAN || yc == IEEE754_CLASS_SNAN) |
| ieee754_setcx(IEEE754_INVALID_OPERATION); |
| return (cmp & IEEE754_CUN) != 0; |
| return (cmp & IEEE754_CLT) != 0; |
| return (cmp & IEEE754_CEQ) != 0; |
| return (cmp & IEEE754_CGT) != 0; |