annotate libgcc/soft-fp/extendxftf2.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
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 Return a converted to IEEE quad
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 "extended.h"
kono
parents:
diff changeset
32 #include "quad.h"
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 TFtype
kono
parents:
diff changeset
35 __extendxftf2 (XFtype a)
kono
parents:
diff changeset
36 {
kono
parents:
diff changeset
37 FP_DECL_EX;
kono
parents:
diff changeset
38 FP_DECL_E (A);
kono
parents:
diff changeset
39 FP_DECL_Q (R);
kono
parents:
diff changeset
40 TFtype r;
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 FP_INIT_TRAPPING_EXCEPTIONS;
kono
parents:
diff changeset
43 FP_UNPACK_RAW_E (A, a);
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
44 #if _FP_W_TYPE_SIZE < 64
111
kono
parents:
diff changeset
45 FP_EXTEND (Q, E, 4, 4, R, A);
kono
parents:
diff changeset
46 #else
kono
parents:
diff changeset
47 FP_EXTEND (Q, E, 2, 2, R, A);
kono
parents:
diff changeset
48 #endif
kono
parents:
diff changeset
49 FP_PACK_RAW_Q (r, R);
kono
parents:
diff changeset
50 FP_HANDLE_EXCEPTIONS;
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 return r;
kono
parents:
diff changeset
53 }