fcnvxf.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) fcnvxf.c (cf159848860d38c2f2509ec19d595f5490ed03e5)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
4 *
5 * Floating-point emulation code
6 * Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.org>
7 */
8/*

--- 4 unchanged lines hidden (view full) ---

13 *
14 * Purpose:
15 * Single Fixed-point to Single Floating-point
16 * Single Fixed-point to Double Floating-point
17 * Double Fixed-point to Single Floating-point
18 * Double Fixed-point to Double Floating-point
19 *
20 * External Interfaces:
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
4 *
5 * Floating-point emulation code
6 * Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.org>
7 */
8/*

--- 4 unchanged lines hidden (view full) ---

13 *
14 * Purpose:
15 * Single Fixed-point to Single Floating-point
16 * Single Fixed-point to Double Floating-point
17 * Double Fixed-point to Single Floating-point
18 * Double Fixed-point to Double Floating-point
19 *
20 * External Interfaces:
21 * dbl_to_dbl_fcnvxf(srcptr,nullptr,dstptr,status)
22 * dbl_to_sgl_fcnvxf(srcptr,nullptr,dstptr,status)
23 * sgl_to_dbl_fcnvxf(srcptr,nullptr,dstptr,status)
24 * sgl_to_sgl_fcnvxf(srcptr,nullptr,dstptr,status)
21 * dbl_to_dbl_fcnvxf(srcptr,_nullptr,dstptr,status)
22 * dbl_to_sgl_fcnvxf(srcptr,_nullptr,dstptr,status)
23 * sgl_to_dbl_fcnvxf(srcptr,_nullptr,dstptr,status)
24 * sgl_to_sgl_fcnvxf(srcptr,_nullptr,dstptr,status)
25 *
26 * Internal Interfaces:
27 *
28 * Theory:
29 * <<please update with a overview of the operation of this file>>
30 *
31 * END_DESC
32*/

--- 6 unchanged lines hidden (view full) ---

39
40/*
41 * Convert single fixed-point to single floating-point format
42 */
43
44int
45sgl_to_sgl_fcnvxf(
46 int *srcptr,
25 *
26 * Internal Interfaces:
27 *
28 * Theory:
29 * <<please update with a overview of the operation of this file>>
30 *
31 * END_DESC
32*/

--- 6 unchanged lines hidden (view full) ---

39
40/*
41 * Convert single fixed-point to single floating-point format
42 */
43
44int
45sgl_to_sgl_fcnvxf(
46 int *srcptr,
47 unsigned int *nullptr,
47 unsigned int *_nullptr,
48 sgl_floating_point *dstptr,
49 unsigned int *status)
50{
51 register int src, dst_exponent;
52 register unsigned int result = 0;
53
54 src = *srcptr;
55 /*

--- 54 unchanged lines hidden (view full) ---

110
111/*
112 * Single Fixed-point to Double Floating-point
113 */
114
115int
116sgl_to_dbl_fcnvxf(
117 int *srcptr,
48 sgl_floating_point *dstptr,
49 unsigned int *status)
50{
51 register int src, dst_exponent;
52 register unsigned int result = 0;
53
54 src = *srcptr;
55 /*

--- 54 unchanged lines hidden (view full) ---

110
111/*
112 * Single Fixed-point to Double Floating-point
113 */
114
115int
116sgl_to_dbl_fcnvxf(
117 int *srcptr,
118 unsigned int *nullptr,
118 unsigned int *_nullptr,
119 dbl_floating_point *dstptr,
120 unsigned int *status)
121{
122 register int src, dst_exponent;
123 register unsigned int resultp1 = 0, resultp2 = 0;
124
125 src = *srcptr;
126 /*

--- 34 unchanged lines hidden (view full) ---

161
162/*
163 * Double Fixed-point to Single Floating-point
164 */
165
166int
167dbl_to_sgl_fcnvxf(
168 dbl_integer *srcptr,
119 dbl_floating_point *dstptr,
120 unsigned int *status)
121{
122 register int src, dst_exponent;
123 register unsigned int resultp1 = 0, resultp2 = 0;
124
125 src = *srcptr;
126 /*

--- 34 unchanged lines hidden (view full) ---

161
162/*
163 * Double Fixed-point to Single Floating-point
164 */
165
166int
167dbl_to_sgl_fcnvxf(
168 dbl_integer *srcptr,
169 unsigned int *nullptr,
169 unsigned int *_nullptr,
170 sgl_floating_point *dstptr,
171 unsigned int *status)
172{
173 int dst_exponent, srcp1;
174 unsigned int result = 0, srcp2;
175
176 Dint_copyfromptr(srcptr,srcp1,srcp2);
177 /*

--- 88 unchanged lines hidden (view full) ---

266
267/*
268 * Double Fixed-point to Double Floating-point
269 */
270
271int
272dbl_to_dbl_fcnvxf(
273 dbl_integer *srcptr,
170 sgl_floating_point *dstptr,
171 unsigned int *status)
172{
173 int dst_exponent, srcp1;
174 unsigned int result = 0, srcp2;
175
176 Dint_copyfromptr(srcptr,srcp1,srcp2);
177 /*

--- 88 unchanged lines hidden (view full) ---

266
267/*
268 * Double Fixed-point to Double Floating-point
269 */
270
271int
272dbl_to_dbl_fcnvxf(
273 dbl_integer *srcptr,
274 unsigned int *nullptr,
274 unsigned int *_nullptr,
275 dbl_floating_point *dstptr,
276 unsigned int *status)
277{
278 register int srcp1, dst_exponent;
279 register unsigned int srcp2, resultp1 = 0, resultp2 = 0;
280
281 Dint_copyfromptr(srcptr,srcp1,srcp2);
282 /*

--- 91 unchanged lines hidden ---
275 dbl_floating_point *dstptr,
276 unsigned int *status)
277{
278 register int srcp1, dst_exponent;
279 register unsigned int srcp2, resultp1 = 0, resultp2 = 0;
280
281 Dint_copyfromptr(srcptr,srcp1,srcp2);
282 /*

--- 91 unchanged lines hidden ---