1169689Skan/* Software floating-point emulation. 2169689Skan Return a - b 3169689Skan Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. 4169689Skan This file is part of the GNU C Library. 5169689Skan Contributed by Richard Henderson (rth@cygnus.com) and 6169689Skan Jakub Jelinek (jj@ultra.linux.cz). 7169689Skan 8169689Skan The GNU C Library is free software; you can redistribute it and/or 9169689Skan modify it under the terms of the GNU Lesser General Public 10169689Skan License as published by the Free Software Foundation; either 11169689Skan version 2.1 of the License, or (at your option) any later version. 12169689Skan 13169689Skan In addition to the permissions in the GNU Lesser General Public 14169689Skan License, the Free Software Foundation gives you unlimited 15169689Skan permission to link the compiled version of this file into 16169689Skan combinations with other programs, and to distribute those 17169689Skan combinations without any restriction coming from the use of this 18169689Skan file. (The Lesser General Public License restrictions do apply in 19169689Skan other respects; for example, they cover modification of the file, 20169689Skan and distribution when not linked into a combine executable.) 21169689Skan 22169689Skan The GNU C Library is distributed in the hope that it will be useful, 23169689Skan but WITHOUT ANY WARRANTY; without even the implied warranty of 24169689Skan MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25169689Skan Lesser General Public License for more details. 26169689Skan 27169689Skan You should have received a copy of the GNU Lesser General Public 28169689Skan License along with the GNU C Library; if not, write to the Free 29169689Skan Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 30169689Skan MA 02110-1301, USA. */ 31169689Skan 32169689Skan#include "soft-fp.h" 33169689Skan#include "quad.h" 34169689Skan 35169689SkanTFtype __subtf3(TFtype a, TFtype b) 36169689Skan{ 37169689Skan FP_DECL_EX; 38169689Skan FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R); 39169689Skan TFtype r; 40169689Skan 41169689Skan FP_INIT_ROUNDMODE; 42169689Skan FP_UNPACK_SEMIRAW_Q(A, a); 43169689Skan FP_UNPACK_SEMIRAW_Q(B, b); 44169689Skan FP_SUB_Q(R, A, B); 45169689Skan FP_PACK_SEMIRAW_Q(r, R); 46169689Skan FP_HANDLE_EXCEPTIONS; 47169689Skan 48169689Skan return r; 49169689Skan} 50