Import 2.3.4pre3
[davej-history.git] / arch / sparc64 / math-emu / fsubs.c
blob3eef72572b59a2f9a026ba157288df6836087007
1 /* $Id: fsubs.c,v 1.4 1999/05/28 13:45:12 jj Exp $
2 * arch/sparc64/math-emu/fsubs.c
4 * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz)
5 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
7 */
9 #include "sfp-util.h"
10 #include "soft-fp.h"
11 #include "single.h"
13 int FSUBS(void *rd, void *rs2, void *rs1)
15 FP_DECL_EX;
16 FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R);
18 FP_UNPACK_SP(A, rs1);
19 FP_UNPACK_SP(B, rs2);
20 if (B_c != FP_CLS_NAN)
21 B_s ^= 1;
22 FP_ADD_S(R, A, B);
23 FP_PACK_SP(rd, R);
24 FP_HANDLE_EXCEPTIONS;