1119610Sache/* Software floating-point emulation. 2119610Sache Return a - b 3119610Sache Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. 4119610Sache This file is part of the GNU C Library. 5119610Sache Contributed by Richard Henderson (rth@cygnus.com) and 6119610Sache Jakub Jelinek (jj@ultra.linux.cz). 7119610Sache 8119610Sache The GNU C Library is free software; you can redistribute it and/or 9119610Sache modify it under the terms of the GNU Lesser General Public 10119610Sache License as published by the Free Software Foundation; either 11119610Sache version 2.1 of the License, or (at your option) any later version. 12119610Sache 13119610Sache In addition to the permissions in the GNU Lesser General Public 14119610Sache License, the Free Software Foundation gives you unlimited 15119610Sache permission to link the compiled version of this file into 16119610Sache combinations with other programs, and to distribute those 17119610Sache combinations without any restriction coming from the use of this 18119610Sache file. (The Lesser General Public License restrictions do apply in 19119610Sache other respects; for example, they cover modification of the file, 20119610Sache and distribution when not linked into a combine executable.) 2175406Sache 2275406Sache The GNU C Library is distributed in the hope that it will be useful, 2375406Sache but WITHOUT ANY WARRANTY; without even the implied warranty of 2475406Sache MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2575406Sache Lesser General Public License for more details. 2675406Sache 2775406Sache You should have received a copy of the GNU Lesser General Public 2875406Sache License along with the GNU C Library; if not, write to the Free 29157184Sache Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 30157184Sache MA 02110-1301, USA. */ 3175406Sache 3275406Sache#include "soft-fp.h" 3375406Sache#include "quad.h" 3421308Sache 3521308SacheTFtype __subtf3(TFtype a, TFtype b) 36136644Sache{ 3721308Sache FP_DECL_EX; 3821308Sache FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R); 39136644Sache TFtype r; 4021308Sache 4121308Sache FP_INIT_ROUNDMODE; 4221308Sache FP_UNPACK_SEMIRAW_Q(A, a); 4321308Sache FP_UNPACK_SEMIRAW_Q(B, b); 4421308Sache FP_SUB_Q(R, A, B); 4521308Sache FP_PACK_SEMIRAW_Q(r, R); 4621308Sache FP_HANDLE_EXCEPTIONS; 4721308Sache 48136644Sache return r; 49136644Sache} 50136644Sache