00001 /* Software floating-point emulation. 00002 Convert a to 32bit signed integer 00003 Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. 00004 This file is part of the GNU C Library. 00005 Contributed by Richard Henderson (rth@cygnus.com) and 00006 Jakub Jelinek (jj@ultra.linux.cz). 00007 00008 The GNU C Library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Lesser General Public 00010 License as published by the Free Software Foundation; either 00011 version 2.1 of the License, or (at your option) any later version. 00012 00013 In addition to the permissions in the GNU Lesser General Public 00014 License, the Free Software Foundation gives you unlimited 00015 permission to link the compiled version of this file into 00016 combinations with other programs, and to distribute those 00017 combinations without any restriction coming from the use of this 00018 file. (The Lesser General Public License restrictions do apply in 00019 other respects; for example, they cover modification of the file, 00020 and distribution when not linked into a combine executable.) 00021 00022 The GNU C Library is distributed in the hope that it will be useful, 00023 but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00025 Lesser General Public License for more details. 00026 00027 You should have received a copy of the GNU Lesser General Public 00028 License along with the GNU C Library; if not, write to the Free 00029 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 00030 MA 02110-1301, USA. */ 00031 00032 #include "soft-fp.h" 00033 #include "single.h" 00034 00035 SItype __fixsfsi(SFtype a) 00036 { 00037 FP_DECL_EX; 00038 FP_DECL_S(A); 00039 USItype r; 00040 00041 FP_UNPACK_RAW_S(A, a); 00042 FP_TO_INT_S(r, A, SI_BITS, 1); 00043 FP_HANDLE_EXCEPTIONS; 00044 00045 return r; 00046 }
1.5.6