annotate libgcc/soft-fp/fixtfti.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Software floating-point emulation.
kono
parents:
diff changeset
2 Convert IEEE quad to 128bit signed integer
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
3 Copyright (C) 2007-2019 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
4 This file is part of the GNU C Library.
kono
parents:
diff changeset
5 Contributed by Uros Bizjak (ubizjak@gmail.com).
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 The GNU C Library is free software; you can redistribute it and/or
kono
parents:
diff changeset
8 modify it under the terms of the GNU Lesser General Public
kono
parents:
diff changeset
9 License as published by the Free Software Foundation; either
kono
parents:
diff changeset
10 version 2.1 of the License, or (at your option) any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 In addition to the permissions in the GNU Lesser General Public
kono
parents:
diff changeset
13 License, the Free Software Foundation gives you unlimited
kono
parents:
diff changeset
14 permission to link the compiled version of this file into
kono
parents:
diff changeset
15 combinations with other programs, and to distribute those
kono
parents:
diff changeset
16 combinations without any restriction coming from the use of this
kono
parents:
diff changeset
17 file. (The Lesser General Public License restrictions do apply in
kono
parents:
diff changeset
18 other respects; for example, they cover modification of the file,
kono
parents:
diff changeset
19 and distribution when not linked into a combine executable.)
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 The GNU C Library is distributed in the hope that it will be useful,
kono
parents:
diff changeset
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
kono
parents:
diff changeset
24 Lesser General Public License for more details.
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 You should have received a copy of the GNU Lesser General Public
kono
parents:
diff changeset
27 License along with the GNU C Library; if not, see
kono
parents:
diff changeset
28 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 #include "soft-fp.h"
kono
parents:
diff changeset
31 #include "quad.h"
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 TItype
kono
parents:
diff changeset
34 __fixtfti (TFtype a)
kono
parents:
diff changeset
35 {
kono
parents:
diff changeset
36 FP_DECL_EX;
kono
parents:
diff changeset
37 FP_DECL_Q (A);
kono
parents:
diff changeset
38 UTItype r;
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 FP_INIT_EXCEPTIONS;
kono
parents:
diff changeset
41 FP_UNPACK_RAW_Q (A, a);
kono
parents:
diff changeset
42 FP_TO_INT_Q (r, A, TI_BITS, 1);
kono
parents:
diff changeset
43 FP_HANDLE_EXCEPTIONS;
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 return r;
kono
parents:
diff changeset
46 }