148fb7bfaSmrg /* Software floating-point emulation.
248fb7bfaSmrg Return a - b
3*fb8a8121Smrg Copyright (C) 1997-2019 Free Software Foundation, Inc.
448fb7bfaSmrg This file is part of the GNU C Library.
548fb7bfaSmrg Contributed by Richard Henderson (rth@cygnus.com) and
648fb7bfaSmrg Jakub Jelinek (jj@ultra.linux.cz).
748fb7bfaSmrg
848fb7bfaSmrg The GNU C Library is free software; you can redistribute it and/or
948fb7bfaSmrg modify it under the terms of the GNU Lesser General Public
1048fb7bfaSmrg License as published by the Free Software Foundation; either
1148fb7bfaSmrg version 2.1 of the License, or (at your option) any later version.
1248fb7bfaSmrg
1348fb7bfaSmrg In addition to the permissions in the GNU Lesser General Public
1448fb7bfaSmrg License, the Free Software Foundation gives you unlimited
1548fb7bfaSmrg permission to link the compiled version of this file into
1648fb7bfaSmrg combinations with other programs, and to distribute those
1748fb7bfaSmrg combinations without any restriction coming from the use of this
1848fb7bfaSmrg file. (The Lesser General Public License restrictions do apply in
1948fb7bfaSmrg other respects; for example, they cover modification of the file,
2048fb7bfaSmrg and distribution when not linked into a combine executable.)
2148fb7bfaSmrg
2248fb7bfaSmrg The GNU C Library is distributed in the hope that it will be useful,
2348fb7bfaSmrg but WITHOUT ANY WARRANTY; without even the implied warranty of
2448fb7bfaSmrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2548fb7bfaSmrg Lesser General Public License for more details.
2648fb7bfaSmrg
2748fb7bfaSmrg You should have received a copy of the GNU Lesser General Public
2848fb7bfaSmrg License along with the GNU C Library; if not, see
2948fb7bfaSmrg <http://www.gnu.org/licenses/>. */
3048fb7bfaSmrg
3148fb7bfaSmrg #include "soft-fp.h"
3248fb7bfaSmrg #include "double.h"
3348fb7bfaSmrg
344d5abbe8Smrg DFtype
__subdf3(DFtype a,DFtype b)354d5abbe8Smrg __subdf3 (DFtype a, DFtype b)
3648fb7bfaSmrg {
3748fb7bfaSmrg FP_DECL_EX;
384d5abbe8Smrg FP_DECL_D (A);
394d5abbe8Smrg FP_DECL_D (B);
404d5abbe8Smrg FP_DECL_D (R);
4148fb7bfaSmrg DFtype r;
4248fb7bfaSmrg
4348fb7bfaSmrg FP_INIT_ROUNDMODE;
4448fb7bfaSmrg FP_UNPACK_SEMIRAW_D (A, a);
4548fb7bfaSmrg FP_UNPACK_SEMIRAW_D (B, b);
4648fb7bfaSmrg FP_SUB_D (R, A, B);
4748fb7bfaSmrg FP_PACK_SEMIRAW_D (r, R);
4848fb7bfaSmrg FP_HANDLE_EXCEPTIONS;
4948fb7bfaSmrg
5048fb7bfaSmrg return r;
5148fb7bfaSmrg }
52