Home | History | Annotate | Line # | Download | only in soft-fp
fixunstfti.c revision 1.1.1.1.4.2
      1  1.1.1.1.4.2  yamt /* Software floating-point emulation.
      2  1.1.1.1.4.2  yamt    Convert IEEE quad to 128bit unsigned integer
      3  1.1.1.1.4.2  yamt    Copyright (C) 2007 Free Software Foundation, Inc.
      4  1.1.1.1.4.2  yamt    This file is part of the GNU C Library.
      5  1.1.1.1.4.2  yamt    Contributed by Uros Bizjak (ubizjak (at) gmail.com).
      6  1.1.1.1.4.2  yamt 
      7  1.1.1.1.4.2  yamt    The GNU C Library is free software; you can redistribute it and/or
      8  1.1.1.1.4.2  yamt    modify it under the terms of the GNU Lesser General Public
      9  1.1.1.1.4.2  yamt    License as published by the Free Software Foundation; either
     10  1.1.1.1.4.2  yamt    version 2.1 of the License, or (at your option) any later version.
     11  1.1.1.1.4.2  yamt 
     12  1.1.1.1.4.2  yamt    In addition to the permissions in the GNU Lesser General Public
     13  1.1.1.1.4.2  yamt    License, the Free Software Foundation gives you unlimited
     14  1.1.1.1.4.2  yamt    permission to link the compiled version of this file into
     15  1.1.1.1.4.2  yamt    combinations with other programs, and to distribute those
     16  1.1.1.1.4.2  yamt    combinations without any restriction coming from the use of this
     17  1.1.1.1.4.2  yamt    file.  (The Lesser General Public License restrictions do apply in
     18  1.1.1.1.4.2  yamt    other respects; for example, they cover modification of the file,
     19  1.1.1.1.4.2  yamt    and distribution when not linked into a combine executable.)
     20  1.1.1.1.4.2  yamt 
     21  1.1.1.1.4.2  yamt    The GNU C Library is distributed in the hope that it will be useful,
     22  1.1.1.1.4.2  yamt    but WITHOUT ANY WARRANTY; without even the implied warranty of
     23  1.1.1.1.4.2  yamt    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     24  1.1.1.1.4.2  yamt    Lesser General Public License for more details.
     25  1.1.1.1.4.2  yamt 
     26  1.1.1.1.4.2  yamt    You should have received a copy of the GNU Lesser General Public
     27  1.1.1.1.4.2  yamt    License along with the GNU C Library; if not, write to the Free
     28  1.1.1.1.4.2  yamt    Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
     29  1.1.1.1.4.2  yamt    MA 02110-1301, USA.  */
     30  1.1.1.1.4.2  yamt 
     31  1.1.1.1.4.2  yamt #include "soft-fp.h"
     32  1.1.1.1.4.2  yamt #include "quad.h"
     33  1.1.1.1.4.2  yamt 
     34  1.1.1.1.4.2  yamt UTItype __fixunstfti(TFtype a)
     35  1.1.1.1.4.2  yamt {
     36  1.1.1.1.4.2  yamt   FP_DECL_EX;
     37  1.1.1.1.4.2  yamt   FP_DECL_Q(A);
     38  1.1.1.1.4.2  yamt   UTItype r;
     39  1.1.1.1.4.2  yamt 
     40  1.1.1.1.4.2  yamt   FP_UNPACK_RAW_Q(A, a);
     41  1.1.1.1.4.2  yamt   FP_TO_INT_Q(r, A, TI_BITS, 0);
     42  1.1.1.1.4.2  yamt   FP_HANDLE_EXCEPTIONS;
     43  1.1.1.1.4.2  yamt 
     44  1.1.1.1.4.2  yamt   return r;
     45  1.1.1.1.4.2  yamt }
     46