diff options
Diffstat (limited to 'meta/packages/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch')
-rw-r--r-- | meta/packages/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch | 4271 |
1 files changed, 0 insertions, 4271 deletions
diff --git a/meta/packages/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch b/meta/packages/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch deleted file mode 100644 index e3a87c87d0..0000000000 --- a/meta/packages/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch +++ /dev/null | |||
@@ -1,4271 +0,0 @@ | |||
1 | * config/rs6000/darwin-ldouble.c: Build file for SOFT_FLOAT. | ||
2 | (strong_alias): Define. | ||
3 | (__gcc_qmul): Provide non-FMA for soft-float. | ||
4 | (__gcc_qdiv): Same. | ||
5 | (__gcc_qneg): New. | ||
6 | (__gcc_qeq): New. | ||
7 | (__gcc_qle): New. | ||
8 | (__gcc_qge): New. | ||
9 | (__gcc_qunord): New. | ||
10 | (__gcc_stoq): New. | ||
11 | (__gcc_dtoq): New. | ||
12 | (__gcc_qtos): New. | ||
13 | (__gcc_qtod): New. | ||
14 | (__gcc_qtoi): New. | ||
15 | (__gcc_qtou): New. | ||
16 | (__gcc_itoq): New. | ||
17 | (__gcc_utoq): New. | ||
18 | (fmsub): New. | ||
19 | * config/rs6000/rs6000.c (rs6000_emit_move): Handle TFmode | ||
20 | constant for soft-float. | ||
21 | (rs6000_init_libfuncs): Initialize soft-float functions. | ||
22 | * config/rs6000/libgcc-ppc-glibc.ver: Version soft-float symbols. | ||
23 | * config/rs6000/rs6000.md (movtf): Allow soft-float. | ||
24 | (movtf_softfloat): New. | ||
25 | * config/rs6000/t-ppccomm (TARGET_LIBGCC2_CFLAGS): Add | ||
26 | -mlong-double-128. | ||
27 | (ldblspecs): Remove. | ||
28 | * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Do not warn | ||
29 | about long double soft float. | ||
30 | |||
31 | diff -urN gcc-4.1.1/gcc/config/rs6000/darwin-ldouble.c gcc-4.1.1-patched/gcc/config/rs6000/darwin-ldouble.c | ||
32 | --- gcc-4.1.1/gcc/config/rs6000/darwin-ldouble.c 2006-03-23 16:23:58.000000000 -0600 | ||
33 | +++ gcc-4.1.1-patched/gcc/config/rs6000/darwin-ldouble.c 2006-09-12 14:30:16.000000000 -0500 | ||
34 | @@ -49,7 +49,8 @@ | ||
35 | |||
36 | This code currently assumes big-endian. */ | ||
37 | |||
38 | -#if (!defined (__NO_FPRS__) && !defined (__LITTLE_ENDIAN__) \ | ||
39 | +#if ((!defined (__NO_FPRS__) || defined (_SOFT_FLOAT)) \ | ||
40 | + && !defined (__LITTLE_ENDIAN__) \ | ||
41 | && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX))) | ||
42 | |||
43 | #define fabs(x) __builtin_fabs(x) | ||
44 | @@ -60,14 +61,19 @@ | ||
45 | |||
46 | #define nonfinite(a) unlikely (! isless (fabs (a), inf ())) | ||
47 | |||
48 | +/* Define ALIASNAME as a strong alias for NAME. */ | ||
49 | +# define strong_alias(name, aliasname) _strong_alias(name, aliasname) | ||
50 | +# define _strong_alias(name, aliasname) \ | ||
51 | + extern __typeof (name) aliasname __attribute__ ((alias (#name))); | ||
52 | + | ||
53 | /* All these routines actually take two long doubles as parameters, | ||
54 | but GCC currently generates poor code when a union is used to turn | ||
55 | a long double into a pair of doubles. */ | ||
56 | |||
57 | -extern long double __gcc_qadd (double, double, double, double); | ||
58 | -extern long double __gcc_qsub (double, double, double, double); | ||
59 | -extern long double __gcc_qmul (double, double, double, double); | ||
60 | -extern long double __gcc_qdiv (double, double, double, double); | ||
61 | +long double __gcc_qadd (double, double, double, double); | ||
62 | +long double __gcc_qsub (double, double, double, double); | ||
63 | +long double __gcc_qmul (double, double, double, double); | ||
64 | +long double __gcc_qdiv (double, double, double, double); | ||
65 | |||
66 | #if defined __ELF__ && defined SHARED \ | ||
67 | && (defined __powerpc64__ || !(defined __linux__ || defined __gnu_hurd__)) | ||
68 | @@ -139,6 +145,10 @@ | ||
69 | return __gcc_qadd (a, b, -c, -d); | ||
70 | } | ||
71 | |||
72 | +#ifdef _SOFT_FLOAT | ||
73 | +static double fmsub (double, double, double); | ||
74 | +#endif | ||
75 | + | ||
76 | long double | ||
77 | __gcc_qmul (double a, double b, double c, double d) | ||
78 | { | ||
79 | @@ -154,7 +164,11 @@ | ||
80 | /* Sum terms of two highest orders. */ | ||
81 | |||
82 | /* Use fused multiply-add to get low part of a * c. */ | ||
83 | +#ifndef _SOFT_FLOAT | ||
84 | asm ("fmsub %0,%1,%2,%3" : "=f"(tau) : "f"(a), "f"(c), "f"(t)); | ||
85 | +#else | ||
86 | + tau = fmsub (a, c, t); | ||
87 | +#endif | ||
88 | v = a*d; | ||
89 | w = b*c; | ||
90 | tau += v + w; /* Add in other second-order terms. */ | ||
91 | @@ -187,7 +201,11 @@ | ||
92 | numerically necessary. */ | ||
93 | |||
94 | /* Use fused multiply-add to get low part of c * t. */ | ||
95 | +#ifndef _SOFT_FLOAT | ||
96 | asm ("fmsub %0,%1,%2,%3" : "=f"(sigma) : "f"(c), "f"(t), "f"(s)); | ||
97 | +#else | ||
98 | + sigma = fmsub (c, t, s); | ||
99 | +#endif | ||
100 | v = a - s; | ||
101 | |||
102 | tau = ((v-sigma)+w)/c; /* Correction to t. */ | ||
103 | @@ -201,4 +219,3959 @@ | ||
104 | return z.ldval; | ||
105 | } | ||
106 | |||
107 | +#ifdef _SOFT_FLOAT | ||
108 | + | ||
109 | +long double __gcc_qneg (double, double); | ||
110 | +int __gcc_qeq (double, double, double, double); | ||
111 | +int __gcc_qne (double, double, double, double); | ||
112 | +int __gcc_qge (double, double, double, double); | ||
113 | +int __gcc_qle (double, double, double, double); | ||
114 | +int __gcc_qunord (double, double, double, double); | ||
115 | +long double __gcc_stoq (float); | ||
116 | +long double __gcc_dtoq (double); | ||
117 | +float __gcc_qtos (double, double); | ||
118 | +double __gcc_qtod (double, double); | ||
119 | +int __gcc_qtoi (double, double); | ||
120 | +unsigned int __gcc_qtou (double, double); | ||
121 | +long double __gcc_itoq (int); | ||
122 | +long double __gcc_utoq (unsigned int); | ||
123 | + | ||
124 | +extern int __eqdf2 (double, double); | ||
125 | +extern int __ledf2 (double, double); | ||
126 | +extern int __gedf2 (double, double); | ||
127 | +extern int __unorddf2 (double, double); | ||
128 | + | ||
129 | +/* Negate 'long double' value and return the result. */ | ||
130 | +long double | ||
131 | +__gcc_qneg (double a, double aa) | ||
132 | +{ | ||
133 | + longDblUnion x; | ||
134 | + | ||
135 | + x.dval[0] = -a; | ||
136 | + x.dval[1] = -aa; | ||
137 | + return x.ldval; | ||
138 | +} | ||
139 | + | ||
140 | +/* Compare two 'long double' values for equality. */ | ||
141 | +int | ||
142 | +__gcc_qeq (double a, double aa, double c, double cc) | ||
143 | +{ | ||
144 | + if (__eqdf2 (a, c) == 0) | ||
145 | + return __eqdf2 (aa, cc); | ||
146 | + return 1; | ||
147 | +} | ||
148 | + | ||
149 | +strong_alias (__gcc_qeq, __gcc_qne); | ||
150 | + | ||
151 | +/* Compare two 'long double' values for less than or equal. */ | ||
152 | +int | ||
153 | +__gcc_qle (double a, double aa, double c, double cc) | ||
154 | +{ | ||
155 | + if (__eqdf2 (a, c) == 0) | ||
156 | + return __ledf2 (aa, cc); | ||
157 | + return __ledf2 (a, c); | ||
158 | +} | ||
159 | + | ||
160 | +strong_alias (__gcc_qle, __gcc_qlt); | ||
161 | + | ||
162 | +/* Compare two 'long double' values for greater than or equal. */ | ||
163 | +int | ||
164 | +__gcc_qge (double a, double aa, double c, double cc) | ||
165 | +{ | ||
166 | + if (__eqdf2 (a, c) == 0) | ||
167 | + return __gedf2 (aa, cc); | ||
168 | + return __gedf2 (a, c); | ||
169 | +} | ||
170 | + | ||
171 | +strong_alias (__gcc_qge, __gcc_qgt); | ||
172 | + | ||
173 | +/* Compare two 'long double' values for unordered. */ | ||
174 | +int | ||
175 | +__gcc_qunord (double a, double aa, double c, double cc) | ||
176 | +{ | ||
177 | + if (__eqdf2 (a, c) == 0) | ||
178 | + return __unorddf2 (aa, cc); | ||
179 | + return __unorddf2 (a, c); | ||
180 | +} | ||
181 | + | ||
182 | +/* Convert single to long double. */ | ||
183 | +long double | ||
184 | +__gcc_stoq (float a) | ||
185 | +{ | ||
186 | + longDblUnion x; | ||
187 | + | ||
188 | + x.dval[0] = (double) a; | ||
189 | + x.dval[1] = 0.0; | ||
190 | + | ||
191 | + return x.ldval; | ||
192 | +} | ||
193 | + | ||
194 | +/* Convert double to long double. */ | ||
195 | +long double | ||
196 | +__gcc_dtoq (double a) | ||
197 | +{ | ||
198 | + longDblUnion x; | ||
199 | + | ||
200 | + x.dval[0] = a; | ||
201 | + x.dval[1] = 0.0; | ||
202 | + | ||
203 | + return x.ldval; | ||
204 | +} | ||
205 | + | ||
206 | +/* Convert long double to single. */ | ||
207 | +float | ||
208 | +__gcc_qtos (double a, double aa __attribute__ ((__unused__))) | ||
209 | +{ | ||
210 | + return (float) a; | ||
211 | +} | ||
212 | + | ||
213 | +/* Convert long double to double. */ | ||
214 | +double | ||
215 | +__gcc_qtod (double a, double aa __attribute__ ((__unused__))) | ||
216 | +{ | ||
217 | + return a; | ||
218 | +} | ||
219 | + | ||
220 | +/* Convert long double to int. */ | ||
221 | +int | ||
222 | +__gcc_qtoi (double a, double aa) | ||
223 | +{ | ||
224 | + double z = a + aa; | ||
225 | + return (int) z; | ||
226 | +} | ||
227 | + | ||
228 | +/* Convert long double to unsigned int. */ | ||
229 | +unsigned int | ||
230 | +__gcc_qtou (double a, double aa) | ||
231 | +{ | ||
232 | + double z = a + aa; | ||
233 | + return (unsigned int) z; | ||
234 | +} | ||
235 | + | ||
236 | +/* Convert int to long double. */ | ||
237 | +long double | ||
238 | +__gcc_itoq (int a) | ||
239 | +{ | ||
240 | + return __gcc_dtoq ((double) a); | ||
241 | +} | ||
242 | + | ||
243 | +/* Convert unsigned int to long double. */ | ||
244 | +long double | ||
245 | +__gcc_utoq (unsigned int a) | ||
246 | +{ | ||
247 | + return __gcc_dtoq ((double) a); | ||
248 | +} | ||
249 | + | ||
250 | +typedef int QItype __attribute__ ((mode (QI))); | ||
251 | +typedef int SItype __attribute__ ((mode (SI))); | ||
252 | +typedef int DItype __attribute__ ((mode (DI))); | ||
253 | +typedef unsigned int UQItype __attribute__ ((mode (QI))); | ||
254 | +typedef unsigned int USItype __attribute__ ((mode (SI))); | ||
255 | +typedef unsigned int UDItype __attribute__ ((mode (DI))); | ||
256 | + | ||
257 | +typedef unsigned int UHWtype __attribute__ ((mode (HI))); | ||
258 | +extern const UQItype __clz_tab[256]; | ||
259 | +extern void abort (void); | ||
260 | +typedef float DFtype __attribute__ ((mode (DF))); | ||
261 | + | ||
262 | +union _FP_UNION_D | ||
263 | +{ | ||
264 | + DFtype flt; | ||
265 | + struct | ||
266 | + { | ||
267 | + | ||
268 | + unsigned sign:1; | ||
269 | + unsigned exp:11; | ||
270 | + unsigned frac1:53 - (((unsigned long) 1 << (53 - 1) % 32) != 0) - 32; | ||
271 | + unsigned frac0:32; | ||
272 | + } bits __attribute__ ((packed)); | ||
273 | +}; | ||
274 | +typedef float TFtype __attribute__ ((mode (TF))); | ||
275 | + | ||
276 | +union _FP_UNION_Q | ||
277 | +{ | ||
278 | + TFtype flt; | ||
279 | + struct | ||
280 | + { | ||
281 | + | ||
282 | + unsigned sign:1; | ||
283 | + unsigned exp:15; | ||
284 | + unsigned long frac3:113 - (((unsigned long) 1 << (113 - 1) % 32) != | ||
285 | + 0) - (32 * 3); | ||
286 | + unsigned long frac2:32; | ||
287 | + unsigned long frac1:32; | ||
288 | + unsigned long frac0:32; | ||
289 | + } bits __attribute__ ((packed)); | ||
290 | +}; | ||
291 | + | ||
292 | +static double | ||
293 | +fmsub (double a, double b, double c) | ||
294 | +{ | ||
295 | + int _fex = 0; | ||
296 | + long A_c __attribute__ ((unused)), A_s, A_e; | ||
297 | + unsigned long A_f0, A_f1; | ||
298 | + long B_c __attribute__ ((unused)), B_s, B_e; | ||
299 | + unsigned long B_f0, B_f1; | ||
300 | + long C_c __attribute__ ((unused)), C_s, C_e; | ||
301 | + unsigned long C_f0, C_f1; | ||
302 | + long X_c __attribute__ ((unused)), X_s, X_e; | ||
303 | + unsigned long X_f[4]; | ||
304 | + long Y_c __attribute__ ((unused)), Y_s, Y_e; | ||
305 | + unsigned long Y_f[4]; | ||
306 | + long Z_c __attribute__ ((unused)), Z_s, Z_e; | ||
307 | + unsigned long Z_f[4]; | ||
308 | + long U_c __attribute__ ((unused)), U_s, U_e; | ||
309 | + unsigned long U_f[4]; | ||
310 | + long V_c __attribute__ ((unused)), V_s, V_e; | ||
311 | + unsigned long V_f[4]; | ||
312 | + long R_c __attribute__ ((unused)), R_s, R_e; | ||
313 | + unsigned long R_f0, R_f1; | ||
314 | + double r; | ||
315 | + long double u, v, x, y, z; | ||
316 | + | ||
317 | +/* FP_INIT_ROUNDMODE */ | ||
318 | + do | ||
319 | + { | ||
320 | + } | ||
321 | + while (0); | ||
322 | + | ||
323 | +/* FP_UNPACK_RAW_D (A, a) */ | ||
324 | + do | ||
325 | + { | ||
326 | + union _FP_UNION_D _flo; | ||
327 | + _flo.flt = (a); | ||
328 | + A_f0 = _flo.bits.frac0; | ||
329 | + A_f1 = _flo.bits.frac1; | ||
330 | + A_e = _flo.bits.exp; | ||
331 | + A_s = _flo.bits.sign; | ||
332 | + } | ||
333 | + while (0); | ||
334 | + | ||
335 | +/* FP_UNPACK_RAW_D (B, b) */ | ||
336 | + do | ||
337 | + { | ||
338 | + union _FP_UNION_D _flo; | ||
339 | + _flo.flt = (b); | ||
340 | + B_f0 = _flo.bits.frac0; | ||
341 | + B_f1 = _flo.bits.frac1; | ||
342 | + B_e = _flo.bits.exp; | ||
343 | + B_s = _flo.bits.sign; | ||
344 | + } | ||
345 | + while (0); | ||
346 | + | ||
347 | +/* FP_UNPACK_RAW_D (C, c) */ | ||
348 | + do | ||
349 | + { | ||
350 | + union _FP_UNION_D _flo; | ||
351 | + _flo.flt = (c); | ||
352 | + C_f0 = _flo.bits.frac0; | ||
353 | + C_f1 = _flo.bits.frac1; | ||
354 | + C_e = _flo.bits.exp; | ||
355 | + C_s = _flo.bits.sign; | ||
356 | + } | ||
357 | + while (0); | ||
358 | + | ||
359 | + /* Extend double to quad. */ | ||
360 | +/* FP_EXTEND(Q,D,4,2,X,A) */ | ||
361 | + do | ||
362 | + { | ||
363 | + if (113 < 53 || (32767 - 16383 < 2047 - 1023) || 16383 < 1023 + 53 - 1) | ||
364 | + abort (); | ||
365 | + X_s = A_s; | ||
366 | + do | ||
367 | + { | ||
368 | + X_f[0] = A_f0; | ||
369 | + X_f[1] = A_f1; | ||
370 | + X_f[2] = X_f[3] = 0; | ||
371 | + } | ||
372 | + while (0); | ||
373 | + if ((((A_e + 1) & 2047) > 1)) | ||
374 | + { | ||
375 | + X_e = A_e + 16383 - 1023; | ||
376 | + do | ||
377 | + { | ||
378 | + long _up, _down, _skip, _i; | ||
379 | + _skip = ((113 - 53)) / 32; | ||
380 | + _up = ((113 - 53)) % 32; | ||
381 | + _down = 32 - _up; | ||
382 | + if (!_up) | ||
383 | + for (_i = 3; _i >= _skip; --_i) | ||
384 | + X_f[_i] = X_f[_i - _skip]; | ||
385 | + else | ||
386 | + { | ||
387 | + for (_i = 3; _i > _skip; --_i) | ||
388 | + X_f[_i] = | ||
389 | + X_f[_i - _skip] << _up | X_f[_i - _skip - 1] >> _down; | ||
390 | + X_f[_i--] = X_f[0] << _up; | ||
391 | + } | ||
392 | + for (; _i >= 0; --_i) | ||
393 | + X_f[_i] = 0; | ||
394 | + } | ||
395 | + while (0); | ||
396 | + } | ||
397 | + else | ||
398 | + { | ||
399 | + if (A_e == 0) | ||
400 | + { | ||
401 | + if (((A_f1 | A_f0) == 0)) | ||
402 | + X_e = 0; | ||
403 | + else | ||
404 | + { | ||
405 | + int _lz; | ||
406 | + _fex |= (0); | ||
407 | + do | ||
408 | + { | ||
409 | + if (A_f1) | ||
410 | + do | ||
411 | + { | ||
412 | + if (sizeof (unsigned long) == | ||
413 | + sizeof (unsigned int)) | ||
414 | + _lz = __builtin_clz (A_f1); | ||
415 | + else if (sizeof (unsigned long) == | ||
416 | + sizeof (unsigned long)) | ||
417 | + _lz = __builtin_clzl (A_f1); | ||
418 | + else if (sizeof (unsigned long) == | ||
419 | + sizeof (unsigned long long)) | ||
420 | + _lz = __builtin_clzll (A_f1); | ||
421 | + else | ||
422 | + abort (); | ||
423 | + } | ||
424 | + while (0); | ||
425 | + else | ||
426 | + { | ||
427 | + do | ||
428 | + { | ||
429 | + if (sizeof (unsigned long) == | ||
430 | + sizeof (unsigned int)) | ||
431 | + _lz = __builtin_clz (A_f0); | ||
432 | + else if (sizeof (unsigned long) == | ||
433 | + sizeof (unsigned long)) | ||
434 | + _lz = __builtin_clzl (A_f0); | ||
435 | + else if (sizeof (unsigned long) == | ||
436 | + sizeof (unsigned long long)) | ||
437 | + _lz = __builtin_clzll (A_f0); | ||
438 | + else | ||
439 | + abort (); | ||
440 | + } | ||
441 | + while (0); | ||
442 | + _lz += 32; | ||
443 | + } | ||
444 | + } | ||
445 | + while (0); | ||
446 | + do | ||
447 | + { | ||
448 | + long _up, _down, _skip, _i; | ||
449 | + _skip = (_lz + 113 - (2 * 32)) / 32; | ||
450 | + _up = (_lz + 113 - (2 * 32)) % 32; | ||
451 | + _down = 32 - _up; | ||
452 | + if (!_up) | ||
453 | + for (_i = 3; _i >= _skip; --_i) | ||
454 | + X_f[_i] = X_f[_i - _skip]; | ||
455 | + else | ||
456 | + { | ||
457 | + for (_i = 3; _i > _skip; --_i) | ||
458 | + X_f[_i] = | ||
459 | + X_f[_i - _skip] << _up | X_f[_i - _skip - | ||
460 | + 1] >> _down; | ||
461 | + X_f[_i--] = X_f[0] << _up; | ||
462 | + } | ||
463 | + for (; _i >= 0; --_i) | ||
464 | + X_f[_i] = 0; | ||
465 | + } | ||
466 | + while (0); | ||
467 | + X_e = (16383 - 1023 + 1 + ((2 * 32) - 53) - _lz); | ||
468 | + } | ||
469 | + } | ||
470 | + else | ||
471 | + { | ||
472 | + X_e = 32767; | ||
473 | + if (!((A_f1 | A_f0) == 0)) | ||
474 | + { | ||
475 | + if (!((A_f1) & ((unsigned long) 1 << (53 - 2) % 32))) | ||
476 | + _fex |= (0); | ||
477 | + do | ||
478 | + { | ||
479 | + long _up, _down, _skip, _i; | ||
480 | + _skip = ((113 - 53)) / 32; | ||
481 | + _up = ((113 - 53)) % 32; | ||
482 | + _down = 32 - _up; | ||
483 | + if (!_up) | ||
484 | + for (_i = 3; _i >= _skip; --_i) | ||
485 | + X_f[_i] = X_f[_i - _skip]; | ||
486 | + else | ||
487 | + { | ||
488 | + for (_i = 3; _i > _skip; --_i) | ||
489 | + X_f[_i] = | ||
490 | + X_f[_i - _skip] << _up | X_f[_i - _skip - | ||
491 | + 1] >> _down; | ||
492 | + X_f[_i--] = X_f[0] << _up; | ||
493 | + } | ||
494 | + for (; _i >= 0; --_i) | ||
495 | + X_f[_i] = 0; | ||
496 | + } | ||
497 | + while (0); | ||
498 | + } | ||
499 | + } | ||
500 | + } | ||
501 | + } | ||
502 | + while (0); | ||
503 | + | ||
504 | +/* FP_EXTEND(Q,D,4,2,Y,B) */ | ||
505 | + do | ||
506 | + { | ||
507 | + if (113 < 53 || (32767 - 16383 < 2047 - 1023) || 16383 < 1023 + 53 - 1) | ||
508 | + abort (); | ||
509 | + Y_s = B_s; | ||
510 | + do | ||
511 | + { | ||
512 | + Y_f[0] = B_f0; | ||
513 | + Y_f[1] = B_f1; | ||
514 | + Y_f[2] = Y_f[3] = 0; | ||
515 | + } | ||
516 | + while (0); | ||
517 | + if ((((B_e + 1) & 2047) > 1)) | ||
518 | + { | ||
519 | + Y_e = B_e + 16383 - 1023; | ||
520 | + do | ||
521 | + { | ||
522 | + long _up, _down, _skip, _i; | ||
523 | + _skip = ((113 - 53)) / 32; | ||
524 | + _up = ((113 - 53)) % 32; | ||
525 | + _down = 32 - _up; | ||
526 | + if (!_up) | ||
527 | + for (_i = 3; _i >= _skip; --_i) | ||
528 | + Y_f[_i] = Y_f[_i - _skip]; | ||
529 | + else | ||
530 | + { | ||
531 | + for (_i = 3; _i > _skip; --_i) | ||
532 | + Y_f[_i] = | ||
533 | + Y_f[_i - _skip] << _up | Y_f[_i - _skip - 1] >> _down; | ||
534 | + Y_f[_i--] = Y_f[0] << _up; | ||
535 | + } | ||
536 | + for (; _i >= 0; --_i) | ||
537 | + Y_f[_i] = 0; | ||
538 | + } | ||
539 | + while (0); | ||
540 | + } | ||
541 | + else | ||
542 | + { | ||
543 | + if (B_e == 0) | ||
544 | + { | ||
545 | + if (((B_f1 | B_f0) == 0)) | ||
546 | + Y_e = 0; | ||
547 | + else | ||
548 | + { | ||
549 | + int _lz; | ||
550 | + _fex |= (0); | ||
551 | + do | ||
552 | + { | ||
553 | + if (B_f1) | ||
554 | + do | ||
555 | + { | ||
556 | + if (sizeof (unsigned long) == | ||
557 | + sizeof (unsigned int)) | ||
558 | + _lz = __builtin_clz (B_f1); | ||
559 | + else if (sizeof (unsigned long) == | ||
560 | + sizeof (unsigned long)) | ||
561 | + _lz = __builtin_clzl (B_f1); | ||
562 | + else if (sizeof (unsigned long) == | ||
563 | + sizeof (unsigned long long)) | ||
564 | + _lz = __builtin_clzll (B_f1); | ||
565 | + else | ||
566 | + abort (); | ||
567 | + } | ||
568 | + while (0); | ||
569 | + else | ||
570 | + { | ||
571 | + do | ||
572 | + { | ||
573 | + if (sizeof (unsigned long) == | ||
574 | + sizeof (unsigned int)) | ||
575 | + _lz = __builtin_clz (B_f0); | ||
576 | + else if (sizeof (unsigned long) == | ||
577 | + sizeof (unsigned long)) | ||
578 | + _lz = __builtin_clzl (B_f0); | ||
579 | + else if (sizeof (unsigned long) == | ||
580 | + sizeof (unsigned long long)) | ||
581 | + _lz = __builtin_clzll (B_f0); | ||
582 | + else | ||
583 | + abort (); | ||
584 | + } | ||
585 | + while (0); | ||
586 | + _lz += 32; | ||
587 | + } | ||
588 | + } | ||
589 | + while (0); | ||
590 | + do | ||
591 | + { | ||
592 | + long _up, _down, _skip, _i; | ||
593 | + _skip = (_lz + 113 - (2 * 32)) / 32; | ||
594 | + _up = (_lz + 113 - (2 * 32)) % 32; | ||
595 | + _down = 32 - _up; | ||
596 | + if (!_up) | ||
597 | + for (_i = 3; _i >= _skip; --_i) | ||
598 | + Y_f[_i] = Y_f[_i - _skip]; | ||
599 | + else | ||
600 | + { | ||
601 | + for (_i = 3; _i > _skip; --_i) | ||
602 | + Y_f[_i] = | ||
603 | + Y_f[_i - _skip] << _up | Y_f[_i - _skip - | ||
604 | + 1] >> _down; | ||
605 | + Y_f[_i--] = Y_f[0] << _up; | ||
606 | + } | ||
607 | + for (; _i >= 0; --_i) | ||
608 | + Y_f[_i] = 0; | ||
609 | + } | ||
610 | + while (0); | ||
611 | + Y_e = (16383 - 1023 + 1 + ((2 * 32) - 53) - _lz); | ||
612 | + } | ||
613 | + } | ||
614 | + else | ||
615 | + { | ||
616 | + Y_e = 32767; | ||
617 | + if (!((B_f1 | B_f0) == 0)) | ||
618 | + { | ||
619 | + if (!((B_f1) & ((unsigned long) 1 << (53 - 2) % 32))) | ||
620 | + _fex |= (0); | ||
621 | + do | ||
622 | + { | ||
623 | + long _up, _down, _skip, _i; | ||
624 | + _skip = ((113 - 53)) / 32; | ||
625 | + _up = ((113 - 53)) % 32; | ||
626 | + _down = 32 - _up; | ||
627 | + if (!_up) | ||
628 | + for (_i = 3; _i >= _skip; --_i) | ||
629 | + Y_f[_i] = Y_f[_i - _skip]; | ||
630 | + else | ||
631 | + { | ||
632 | + for (_i = 3; _i > _skip; --_i) | ||
633 | + Y_f[_i] = | ||
634 | + Y_f[_i - _skip] << _up | Y_f[_i - _skip - | ||
635 | + 1] >> _down; | ||
636 | + Y_f[_i--] = Y_f[0] << _up; | ||
637 | + } | ||
638 | + for (; _i >= 0; --_i) | ||
639 | + Y_f[_i] = 0; | ||
640 | + } | ||
641 | + while (0); | ||
642 | + } | ||
643 | + } | ||
644 | + } | ||
645 | + } | ||
646 | + while (0); | ||
647 | + | ||
648 | +/* FP_EXTEND(Q,D,4,2,Z,C) */ | ||
649 | + do | ||
650 | + { | ||
651 | + if (113 < 53 || (32767 - 16383 < 2047 - 1023) || 16383 < 1023 + 53 - 1) | ||
652 | + abort (); | ||
653 | + Z_s = C_s; | ||
654 | + do | ||
655 | + { | ||
656 | + Z_f[0] = C_f0; | ||
657 | + Z_f[1] = C_f1; | ||
658 | + Z_f[2] = Z_f[3] = 0; | ||
659 | + } | ||
660 | + while (0); | ||
661 | + if ((((C_e + 1) & 2047) > 1)) | ||
662 | + { | ||
663 | + Z_e = C_e + 16383 - 1023; | ||
664 | + do | ||
665 | + { | ||
666 | + long _up, _down, _skip, _i; | ||
667 | + _skip = ((113 - 53)) / 32; | ||
668 | + _up = ((113 - 53)) % 32; | ||
669 | + _down = 32 - _up; | ||
670 | + if (!_up) | ||
671 | + for (_i = 3; _i >= _skip; --_i) | ||
672 | + Z_f[_i] = Z_f[_i - _skip]; | ||
673 | + else | ||
674 | + { | ||
675 | + for (_i = 3; _i > _skip; --_i) | ||
676 | + Z_f[_i] = | ||
677 | + Z_f[_i - _skip] << _up | Z_f[_i - _skip - 1] >> _down; | ||
678 | + Z_f[_i--] = Z_f[0] << _up; | ||
679 | + } | ||
680 | + for (; _i >= 0; --_i) | ||
681 | + Z_f[_i] = 0; | ||
682 | + } | ||
683 | + while (0); | ||
684 | + } | ||
685 | + else | ||
686 | + { | ||
687 | + if (C_e == 0) | ||
688 | + { | ||
689 | + if (((C_f1 | C_f0) == 0)) | ||
690 | + Z_e = 0; | ||
691 | + else | ||
692 | + { | ||
693 | + int _lz; | ||
694 | + _fex |= (0); | ||
695 | + do | ||
696 | + { | ||
697 | + if (C_f1) | ||
698 | + do | ||
699 | + { | ||
700 | + if (sizeof (unsigned long) == | ||
701 | + sizeof (unsigned int)) | ||
702 | + _lz = __builtin_clz (C_f1); | ||
703 | + else if (sizeof (unsigned long) == | ||
704 | + sizeof (unsigned long)) | ||
705 | + _lz = __builtin_clzl (C_f1); | ||
706 | + else if (sizeof (unsigned long) == | ||
707 | + sizeof (unsigned long long)) | ||
708 | + _lz = __builtin_clzll (C_f1); | ||
709 | + else | ||
710 | + abort (); | ||
711 | + } | ||
712 | + while (0); | ||
713 | + else | ||
714 | + { | ||
715 | + do | ||
716 | + { | ||
717 | + if (sizeof (unsigned long) == | ||
718 | + sizeof (unsigned int)) | ||
719 | + _lz = __builtin_clz (C_f0); | ||
720 | + else if (sizeof (unsigned long) == | ||
721 | + sizeof (unsigned long)) | ||
722 | + _lz = __builtin_clzl (C_f0); | ||
723 | + else if (sizeof (unsigned long) == | ||
724 | + sizeof (unsigned long long)) | ||
725 | + _lz = __builtin_clzll (C_f0); | ||
726 | + else | ||
727 | + abort (); | ||
728 | + } | ||
729 | + while (0); | ||
730 | + _lz += 32; | ||
731 | + } | ||
732 | + } | ||
733 | + while (0); | ||
734 | + do | ||
735 | + { | ||
736 | + long _up, _down, _skip, _i; | ||
737 | + _skip = (_lz + 113 - (2 * 32)) / 32; | ||
738 | + _up = (_lz + 113 - (2 * 32)) % 32; | ||
739 | + _down = 32 - _up; | ||
740 | + if (!_up) | ||
741 | + for (_i = 3; _i >= _skip; --_i) | ||
742 | + Z_f[_i] = Z_f[_i - _skip]; | ||
743 | + else | ||
744 | + { | ||
745 | + for (_i = 3; _i > _skip; --_i) | ||
746 | + Z_f[_i] = | ||
747 | + Z_f[_i - _skip] << _up | Z_f[_i - _skip - | ||
748 | + 1] >> _down; | ||
749 | + Z_f[_i--] = Z_f[0] << _up; | ||
750 | + } | ||
751 | + for (; _i >= 0; --_i) | ||
752 | + Z_f[_i] = 0; | ||
753 | + } | ||
754 | + while (0); | ||
755 | + Z_e = (16383 - 1023 + 1 + ((2 * 32) - 53) - _lz); | ||
756 | + } | ||
757 | + } | ||
758 | + else | ||
759 | + { | ||
760 | + Z_e = 32767; | ||
761 | + if (!((C_f1 | C_f0) == 0)) | ||
762 | + { | ||
763 | + if (!((C_f1) & ((unsigned long) 1 << (53 - 2) % 32))) | ||
764 | + _fex |= (0); | ||
765 | + do | ||
766 | + { | ||
767 | + long _up, _down, _skip, _i; | ||
768 | + _skip = ((113 - 53)) / 32; | ||
769 | + _up = ((113 - 53)) % 32; | ||
770 | + _down = 32 - _up; | ||
771 | + if (!_up) | ||
772 | + for (_i = 3; _i >= _skip; --_i) | ||
773 | + Z_f[_i] = Z_f[_i - _skip]; | ||
774 | + else | ||
775 | + { | ||
776 | + for (_i = 3; _i > _skip; --_i) | ||
777 | + Z_f[_i] = | ||
778 | + Z_f[_i - _skip] << _up | Z_f[_i - _skip - | ||
779 | + 1] >> _down; | ||
780 | + Z_f[_i--] = Z_f[0] << _up; | ||
781 | + } | ||
782 | + for (; _i >= 0; --_i) | ||
783 | + Z_f[_i] = 0; | ||
784 | + } | ||
785 | + while (0); | ||
786 | + } | ||
787 | + } | ||
788 | + } | ||
789 | + } | ||
790 | + while (0); | ||
791 | + | ||
792 | +/* FP_PACK_RAW_Q(x,X) */ | ||
793 | + do | ||
794 | + { | ||
795 | + union _FP_UNION_Q _flo; | ||
796 | + _flo.bits.frac0 = X_f[0]; | ||
797 | + _flo.bits.frac1 = X_f[1]; | ||
798 | + _flo.bits.frac2 = X_f[2]; | ||
799 | + _flo.bits.frac3 = X_f[3]; | ||
800 | + _flo.bits.exp = X_e; | ||
801 | + _flo.bits.sign = X_s; | ||
802 | + (x) = _flo.flt; | ||
803 | + } | ||
804 | + while (0); | ||
805 | + | ||
806 | +/* FP_PACK_RAW_Q(y,Y) */ | ||
807 | + do | ||
808 | + { | ||
809 | + union _FP_UNION_Q _flo; | ||
810 | + _flo.bits.frac0 = Y_f[0]; | ||
811 | + _flo.bits.frac1 = Y_f[1]; | ||
812 | + _flo.bits.frac2 = Y_f[2]; | ||
813 | + _flo.bits.frac3 = Y_f[3]; | ||
814 | + _flo.bits.exp = Y_e; | ||
815 | + _flo.bits.sign = Y_s; | ||
816 | + (y) = _flo.flt; | ||
817 | + } | ||
818 | + while (0); | ||
819 | + | ||
820 | +/* FP_PACK_RAW_Q(z,Z) */ | ||
821 | + do | ||
822 | + { | ||
823 | + union _FP_UNION_Q _flo; | ||
824 | + _flo.bits.frac0 = Z_f[0]; | ||
825 | + _flo.bits.frac1 = Z_f[1]; | ||
826 | + _flo.bits.frac2 = Z_f[2]; | ||
827 | + _flo.bits.frac3 = Z_f[3]; | ||
828 | + _flo.bits.exp = Z_e; | ||
829 | + _flo.bits.sign = Z_s; | ||
830 | + (z) = _flo.flt; | ||
831 | + } | ||
832 | + while (0); | ||
833 | + | ||
834 | +/* FP_HANDLE_EXCEPTIONS */ | ||
835 | + do | ||
836 | + { | ||
837 | + } | ||
838 | + while (0); | ||
839 | + | ||
840 | + /* Multiply. */ | ||
841 | +/* FP_INIT_ROUNDMODE */ | ||
842 | + do | ||
843 | + { | ||
844 | + } | ||
845 | + while (0); | ||
846 | + | ||
847 | +/* FP_UNPACK_Q(X,x) */ | ||
848 | + do | ||
849 | + { | ||
850 | + do | ||
851 | + { | ||
852 | + union _FP_UNION_Q _flo; | ||
853 | + _flo.flt = (x); | ||
854 | + X_f[0] = _flo.bits.frac0; | ||
855 | + X_f[1] = _flo.bits.frac1; | ||
856 | + X_f[2] = _flo.bits.frac2; | ||
857 | + X_f[3] = _flo.bits.frac3; | ||
858 | + X_e = _flo.bits.exp; | ||
859 | + X_s = _flo.bits.sign; | ||
860 | + } | ||
861 | + while (0); | ||
862 | + do | ||
863 | + { | ||
864 | + switch (X_e) | ||
865 | + { | ||
866 | + default: | ||
867 | + (X_f[3]) |= ((unsigned long) 1 << (113 - 1) % 32); | ||
868 | + do | ||
869 | + { | ||
870 | + long _up, _down, _skip, _i; | ||
871 | + _skip = (3) / 32; | ||
872 | + _up = (3) % 32; | ||
873 | + _down = 32 - _up; | ||
874 | + if (!_up) | ||
875 | + for (_i = 3; _i >= _skip; --_i) | ||
876 | + X_f[_i] = X_f[_i - _skip]; | ||
877 | + else | ||
878 | + { | ||
879 | + for (_i = 3; _i > _skip; --_i) | ||
880 | + X_f[_i] = | ||
881 | + X_f[_i - _skip] << _up | X_f[_i - _skip - | ||
882 | + 1] >> _down; | ||
883 | + X_f[_i--] = X_f[0] << _up; | ||
884 | + } | ||
885 | + for (; _i >= 0; --_i) | ||
886 | + X_f[_i] = 0; | ||
887 | + } | ||
888 | + while (0); | ||
889 | + X_e -= 16383; | ||
890 | + X_c = 0; | ||
891 | + break; | ||
892 | + case 0: | ||
893 | + if (((X_f[0] | X_f[1] | X_f[2] | X_f[3]) == 0)) | ||
894 | + X_c = 1; | ||
895 | + else | ||
896 | + { | ||
897 | + long _shift; | ||
898 | + do | ||
899 | + { | ||
900 | + if (X_f[3]) | ||
901 | + { | ||
902 | + do | ||
903 | + { | ||
904 | + if (sizeof (unsigned long) == | ||
905 | + sizeof (unsigned int)) | ||
906 | + _shift = __builtin_clz (X_f[3]); | ||
907 | + else if (sizeof (unsigned long) == | ||
908 | + sizeof (unsigned long)) | ||
909 | + _shift = __builtin_clzl (X_f[3]); | ||
910 | + else if (sizeof (unsigned long) == | ||
911 | + sizeof (unsigned long long)) | ||
912 | + _shift = __builtin_clzll (X_f[3]); | ||
913 | + else | ||
914 | + abort (); | ||
915 | + } | ||
916 | + while (0); | ||
917 | + } | ||
918 | + else if (X_f[2]) | ||
919 | + { | ||
920 | + do | ||
921 | + { | ||
922 | + if (sizeof (unsigned long) == | ||
923 | + sizeof (unsigned int)) | ||
924 | + _shift = __builtin_clz (X_f[2]); | ||
925 | + else if (sizeof (unsigned long) == | ||
926 | + sizeof (unsigned long)) | ||
927 | + _shift = __builtin_clzl (X_f[2]); | ||
928 | + else if (sizeof (unsigned long) == | ||
929 | + sizeof (unsigned long long)) | ||
930 | + _shift = __builtin_clzll (X_f[2]); | ||
931 | + else | ||
932 | + abort (); | ||
933 | + } | ||
934 | + while (0); | ||
935 | + _shift += 32; | ||
936 | + } | ||
937 | + else if (X_f[1]) | ||
938 | + { | ||
939 | + do | ||
940 | + { | ||
941 | + if (sizeof (unsigned long) == | ||
942 | + sizeof (unsigned int)) | ||
943 | + _shift = __builtin_clz (X_f[1]); | ||
944 | + else if (sizeof (unsigned long) == | ||
945 | + sizeof (unsigned long)) | ||
946 | + _shift = __builtin_clzl (X_f[1]); | ||
947 | + else if (sizeof (unsigned long) == | ||
948 | + sizeof (unsigned long long)) | ||
949 | + _shift = __builtin_clzll (X_f[1]); | ||
950 | + else | ||
951 | + abort (); | ||
952 | + } | ||
953 | + while (0); | ||
954 | + _shift += 32 * 2; | ||
955 | + } | ||
956 | + else | ||
957 | + { | ||
958 | + do | ||
959 | + { | ||
960 | + if (sizeof (unsigned long) == | ||
961 | + sizeof (unsigned int)) | ||
962 | + _shift = __builtin_clz (X_f[0]); | ||
963 | + else if (sizeof (unsigned long) == | ||
964 | + sizeof (unsigned long)) | ||
965 | + _shift = __builtin_clzl (X_f[0]); | ||
966 | + else if (sizeof (unsigned long) == | ||
967 | + sizeof (unsigned long long)) | ||
968 | + _shift = __builtin_clzll (X_f[0]); | ||
969 | + else | ||
970 | + abort (); | ||
971 | + } | ||
972 | + while (0); | ||
973 | + _shift += 32 * 3; | ||
974 | + } | ||
975 | + } | ||
976 | + while (0); | ||
977 | + _shift -= ((4 * 32) - 113); | ||
978 | + do | ||
979 | + { | ||
980 | + long _up, _down, _skip, _i; | ||
981 | + _skip = ((_shift + 3)) / 32; | ||
982 | + _up = ((_shift + 3)) % 32; | ||
983 | + _down = 32 - _up; | ||
984 | + if (!_up) | ||
985 | + for (_i = 3; _i >= _skip; --_i) | ||
986 | + X_f[_i] = X_f[_i - _skip]; | ||
987 | + else | ||
988 | + { | ||
989 | + for (_i = 3; _i > _skip; --_i) | ||
990 | + X_f[_i] = | ||
991 | + X_f[_i - _skip] << _up | X_f[_i - _skip - | ||
992 | + 1] >> _down; | ||
993 | + X_f[_i--] = X_f[0] << _up; | ||
994 | + } | ||
995 | + for (; _i >= 0; --_i) | ||
996 | + X_f[_i] = 0; | ||
997 | + } | ||
998 | + while (0); | ||
999 | + X_e -= 16383 - 1 + _shift; | ||
1000 | + X_c = 0; | ||
1001 | + _fex |= (0); | ||
1002 | + } | ||
1003 | + break; | ||
1004 | + case 32767: | ||
1005 | + if (((X_f[0] | X_f[1] | X_f[2] | X_f[3]) == 0)) | ||
1006 | + X_c = 2; | ||
1007 | + else | ||
1008 | + { | ||
1009 | + X_c = 3; | ||
1010 | + if (!((X_f[3]) & ((unsigned long) 1 << (113 - 2) % 32))) | ||
1011 | + _fex |= (0); | ||
1012 | + } break; | ||
1013 | + } | ||
1014 | + } | ||
1015 | + while (0); | ||
1016 | + } | ||
1017 | + while (0); | ||
1018 | + | ||
1019 | +/* FP_UNPACK_Q(Y,y) */ | ||
1020 | + do | ||
1021 | + { | ||
1022 | + do | ||
1023 | + { | ||
1024 | + union _FP_UNION_Q _flo; | ||
1025 | + _flo.flt = (y); | ||
1026 | + Y_f[0] = _flo.bits.frac0; | ||
1027 | + Y_f[1] = _flo.bits.frac1; | ||
1028 | + Y_f[2] = _flo.bits.frac2; | ||
1029 | + Y_f[3] = _flo.bits.frac3; | ||
1030 | + Y_e = _flo.bits.exp; | ||
1031 | + Y_s = _flo.bits.sign; | ||
1032 | + } | ||
1033 | + while (0); | ||
1034 | + do | ||
1035 | + { | ||
1036 | + switch (Y_e) | ||
1037 | + { | ||
1038 | + default: | ||
1039 | + (Y_f[3]) |= ((unsigned long) 1 << (113 - 1) % 32); | ||
1040 | + do | ||
1041 | + { | ||
1042 | + long _up, _down, _skip, _i; | ||
1043 | + _skip = (3) / 32; | ||
1044 | + _up = (3) % 32; | ||
1045 | + _down = 32 - _up; | ||
1046 | + if (!_up) | ||
1047 | + for (_i = 3; _i >= _skip; --_i) | ||
1048 | + Y_f[_i] = Y_f[_i - _skip]; | ||
1049 | + else | ||
1050 | + { | ||
1051 | + for (_i = 3; _i > _skip; --_i) | ||
1052 | + Y_f[_i] = | ||
1053 | + Y_f[_i - _skip] << _up | Y_f[_i - _skip - | ||
1054 | + 1] >> _down; | ||
1055 | + Y_f[_i--] = Y_f[0] << _up; | ||
1056 | + } | ||
1057 | + for (; _i >= 0; --_i) | ||
1058 | + Y_f[_i] = 0; | ||
1059 | + } | ||
1060 | + while (0); | ||
1061 | + Y_e -= 16383; | ||
1062 | + Y_c = 0; | ||
1063 | + break; | ||
1064 | + case 0: | ||
1065 | + if (((Y_f[0] | Y_f[1] | Y_f[2] | Y_f[3]) == 0)) | ||
1066 | + Y_c = 1; | ||
1067 | + else | ||
1068 | + { | ||
1069 | + long _shift; | ||
1070 | + do | ||
1071 | + { | ||
1072 | + if (Y_f[3]) | ||
1073 | + { | ||
1074 | + do | ||
1075 | + { | ||
1076 | + if (sizeof (unsigned long) == | ||
1077 | + sizeof (unsigned int)) | ||
1078 | + _shift = __builtin_clz (Y_f[3]); | ||
1079 | + else if (sizeof (unsigned long) == | ||
1080 | + sizeof (unsigned long)) | ||
1081 | + _shift = __builtin_clzl (Y_f[3]); | ||
1082 | + else if (sizeof (unsigned long) == | ||
1083 | + sizeof (unsigned long long)) | ||
1084 | + _shift = __builtin_clzll (Y_f[3]); | ||
1085 | + else | ||
1086 | + abort (); | ||
1087 | + } | ||
1088 | + while (0); | ||
1089 | + } | ||
1090 | + else if (Y_f[2]) | ||
1091 | + { | ||
1092 | + do | ||
1093 | + { | ||
1094 | + if (sizeof (unsigned long) == | ||
1095 | + sizeof (unsigned int)) | ||
1096 | + _shift = __builtin_clz (Y_f[2]); | ||
1097 | + else if (sizeof (unsigned long) == | ||
1098 | + sizeof (unsigned long)) | ||
1099 | + _shift = __builtin_clzl (Y_f[2]); | ||
1100 | + else if (sizeof (unsigned long) == | ||
1101 | + sizeof (unsigned long long)) | ||
1102 | + _shift = __builtin_clzll (Y_f[2]); | ||
1103 | + else | ||
1104 | + abort (); | ||
1105 | + } | ||
1106 | + while (0); | ||
1107 | + _shift += 32; | ||
1108 | + } | ||
1109 | + else if (Y_f[1]) | ||
1110 | + { | ||
1111 | + do | ||
1112 | + { | ||
1113 | + if (sizeof (unsigned long) == | ||
1114 | + sizeof (unsigned int)) | ||
1115 | + _shift = __builtin_clz (Y_f[1]); | ||
1116 | + else if (sizeof (unsigned long) == | ||
1117 | + sizeof (unsigned long)) | ||
1118 | + _shift = __builtin_clzl (Y_f[1]); | ||
1119 | + else if (sizeof (unsigned long) == | ||
1120 | + sizeof (unsigned long long)) | ||
1121 | + _shift = __builtin_clzll (Y_f[1]); | ||
1122 | + else | ||
1123 | + abort (); | ||
1124 | + } | ||
1125 | + while (0); | ||
1126 | + _shift += 32 * 2; | ||
1127 | + } | ||
1128 | + else | ||
1129 | + { | ||
1130 | + do | ||
1131 | + { | ||
1132 | + if (sizeof (unsigned long) == | ||
1133 | + sizeof (unsigned int)) | ||
1134 | + _shift = __builtin_clz (Y_f[0]); | ||
1135 | + else if (sizeof (unsigned long) == | ||
1136 | + sizeof (unsigned long)) | ||
1137 | + _shift = __builtin_clzl (Y_f[0]); | ||
1138 | + else if (sizeof (unsigned long) == | ||
1139 | + sizeof (unsigned long long)) | ||
1140 | + _shift = __builtin_clzll (Y_f[0]); | ||
1141 | + else | ||
1142 | + abort (); | ||
1143 | + } | ||
1144 | + while (0); | ||
1145 | + _shift += 32 * 3; | ||
1146 | + } | ||
1147 | + } | ||
1148 | + while (0); | ||
1149 | + _shift -= ((4 * 32) - 113); | ||
1150 | + do | ||
1151 | + { | ||
1152 | + long _up, _down, _skip, _i; | ||
1153 | + _skip = ((_shift + 3)) / 32; | ||
1154 | + _up = ((_shift + 3)) % 32; | ||
1155 | + _down = 32 - _up; | ||
1156 | + if (!_up) | ||
1157 | + for (_i = 3; _i >= _skip; --_i) | ||
1158 | + Y_f[_i] = Y_f[_i - _skip]; | ||
1159 | + else | ||
1160 | + { | ||
1161 | + for (_i = 3; _i > _skip; --_i) | ||
1162 | + Y_f[_i] = | ||
1163 | + Y_f[_i - _skip] << _up | Y_f[_i - _skip - | ||
1164 | + 1] >> _down; | ||
1165 | + Y_f[_i--] = Y_f[0] << _up; | ||
1166 | + } | ||
1167 | + for (; _i >= 0; --_i) | ||
1168 | + Y_f[_i] = 0; | ||
1169 | + } | ||
1170 | + while (0); | ||
1171 | + Y_e -= 16383 - 1 + _shift; | ||
1172 | + Y_c = 0; | ||
1173 | + _fex |= (0); | ||
1174 | + } | ||
1175 | + break; | ||
1176 | + case 32767: | ||
1177 | + if (((Y_f[0] | Y_f[1] | Y_f[2] | Y_f[3]) == 0)) | ||
1178 | + Y_c = 2; | ||
1179 | + else | ||
1180 | + { | ||
1181 | + Y_c = 3; | ||
1182 | + if (!((Y_f[3]) & ((unsigned long) 1 << (113 - 2) % 32))) | ||
1183 | + _fex |= (0); | ||
1184 | + } break; | ||
1185 | + } | ||
1186 | + } | ||
1187 | + while (0); | ||
1188 | + } | ||
1189 | + while (0); | ||
1190 | + | ||
1191 | +/* FP_MUL_Q(U,X,Y) */ | ||
1192 | + do | ||
1193 | + { | ||
1194 | + U_s = X_s ^ Y_s; | ||
1195 | + switch ((((X_c) << 2) | (Y_c))) | ||
1196 | + { | ||
1197 | + case (((0) << 2) | (0)): | ||
1198 | + U_c = 0; | ||
1199 | + U_e = X_e + Y_e + 1; | ||
1200 | + do | ||
1201 | + { | ||
1202 | + unsigned long _z_f[8]; | ||
1203 | + unsigned long _b_f0, _b_f1; | ||
1204 | + unsigned long _c_f0, _c_f1; | ||
1205 | + unsigned long _d_f0, _d_f1; | ||
1206 | + unsigned long _e_f0, _e_f1; | ||
1207 | + unsigned long _f_f0, _f_f1; | ||
1208 | + do | ||
1209 | + { | ||
1210 | + USItype __m0 = (X_f[0]), __m1 = (Y_f[0]); | ||
1211 | + __asm__ ("mulhwu %0,%1,%2": "=r" ((_z_f[1])):"%r" (X_f[0]), | ||
1212 | + "r" (Y_f | ||
1213 | + [0])); | ||
1214 | + ((_z_f[0])) = __m0 * __m1; | ||
1215 | + } | ||
1216 | + while (0); | ||
1217 | + do | ||
1218 | + { | ||
1219 | + USItype __m0 = (X_f[0]), __m1 = (Y_f[1]); | ||
1220 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_b_f1):"%r" (X_f[0]), | ||
1221 | + "r" (Y_f | ||
1222 | + [1])); | ||
1223 | + (_b_f0) = __m0 * __m1; | ||
1224 | + } | ||
1225 | + while (0); | ||
1226 | + do | ||
1227 | + { | ||
1228 | + USItype __m0 = (X_f[1]), __m1 = (Y_f[0]); | ||
1229 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_c_f1):"%r" (X_f[1]), | ||
1230 | + "r" (Y_f | ||
1231 | + [0])); | ||
1232 | + (_c_f0) = __m0 * __m1; | ||
1233 | + } | ||
1234 | + while (0); | ||
1235 | + do | ||
1236 | + { | ||
1237 | + USItype __m0 = (X_f[1]), __m1 = (Y_f[1]); | ||
1238 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_d_f1):"%r" (X_f[1]), | ||
1239 | + "r" (Y_f | ||
1240 | + [1])); | ||
1241 | + (_d_f0) = __m0 * __m1; | ||
1242 | + } | ||
1243 | + while (0); | ||
1244 | + do | ||
1245 | + { | ||
1246 | + USItype __m0 = (X_f[0]), __m1 = (Y_f[2]); | ||
1247 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_e_f1):"%r" (X_f[0]), | ||
1248 | + "r" (Y_f | ||
1249 | + [2])); | ||
1250 | + (_e_f0) = __m0 * __m1; | ||
1251 | + } | ||
1252 | + while (0); | ||
1253 | + do | ||
1254 | + { | ||
1255 | + USItype __m0 = (X_f[2]), __m1 = (Y_f[0]); | ||
1256 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_f_f1):"%r" (X_f[2]), | ||
1257 | + "r" (Y_f | ||
1258 | + [0])); | ||
1259 | + (_f_f0) = __m0 * __m1; | ||
1260 | + } | ||
1261 | + while (0); | ||
1262 | + do | ||
1263 | + { | ||
1264 | + unsigned long _c1, _c2; | ||
1265 | + (_z_f[1]) = _b_f0 + (_z_f[1]); | ||
1266 | + _c1 = (_z_f[1]) < _b_f0; | ||
1267 | + (_z_f[2]) = _b_f1 + 0; | ||
1268 | + _c2 = (_z_f[2]) < _b_f1; | ||
1269 | + (_z_f[2]) += _c1; | ||
1270 | + _c2 |= (_z_f[2]) < _c1; | ||
1271 | + (_z_f[3]) = 0 + 0 + _c2; | ||
1272 | + } | ||
1273 | + while (0); | ||
1274 | + do | ||
1275 | + { | ||
1276 | + unsigned long _c1, _c2; | ||
1277 | + (_z_f[1]) = _c_f0 + (_z_f[1]); | ||
1278 | + _c1 = (_z_f[1]) < _c_f0; | ||
1279 | + (_z_f[2]) = _c_f1 + (_z_f[2]); | ||
1280 | + _c2 = (_z_f[2]) < _c_f1; | ||
1281 | + (_z_f[2]) += _c1; | ||
1282 | + _c2 |= (_z_f[2]) < _c1; | ||
1283 | + (_z_f[3]) = 0 + (_z_f[3]) + _c2; | ||
1284 | + } | ||
1285 | + while (0); | ||
1286 | + do | ||
1287 | + { | ||
1288 | + unsigned long _c1, _c2; | ||
1289 | + (_z_f[2]) = _d_f0 + (_z_f[2]); | ||
1290 | + _c1 = (_z_f[2]) < _d_f0; | ||
1291 | + (_z_f[3]) = _d_f1 + (_z_f[3]); | ||
1292 | + _c2 = (_z_f[3]) < _d_f1; | ||
1293 | + (_z_f[3]) += _c1; | ||
1294 | + _c2 |= (_z_f[3]) < _c1; | ||
1295 | + (_z_f[4]) = 0 + 0 + _c2; | ||
1296 | + } | ||
1297 | + while (0); | ||
1298 | + do | ||
1299 | + { | ||
1300 | + unsigned long _c1, _c2; | ||
1301 | + (_z_f[2]) = _e_f0 + (_z_f[2]); | ||
1302 | + _c1 = (_z_f[2]) < _e_f0; | ||
1303 | + (_z_f[3]) = _e_f1 + (_z_f[3]); | ||
1304 | + _c2 = (_z_f[3]) < _e_f1; | ||
1305 | + (_z_f[3]) += _c1; | ||
1306 | + _c2 |= (_z_f[3]) < _c1; | ||
1307 | + (_z_f[4]) = 0 + (_z_f[4]) + _c2; | ||
1308 | + } | ||
1309 | + while (0); | ||
1310 | + do | ||
1311 | + { | ||
1312 | + unsigned long _c1, _c2; | ||
1313 | + (_z_f[2]) = _f_f0 + (_z_f[2]); | ||
1314 | + _c1 = (_z_f[2]) < _f_f0; | ||
1315 | + (_z_f[3]) = _f_f1 + (_z_f[3]); | ||
1316 | + _c2 = (_z_f[3]) < _f_f1; | ||
1317 | + (_z_f[3]) += _c1; | ||
1318 | + _c2 |= (_z_f[3]) < _c1; | ||
1319 | + (_z_f[4]) = 0 + (_z_f[4]) + _c2; | ||
1320 | + } | ||
1321 | + while (0); | ||
1322 | + do | ||
1323 | + { | ||
1324 | + USItype __m0 = (X_f[0]), __m1 = (Y_f[3]); | ||
1325 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_b_f1):"%r" (X_f[0]), | ||
1326 | + "r" (Y_f | ||
1327 | + [3])); | ||
1328 | + (_b_f0) = __m0 * __m1; | ||
1329 | + } | ||
1330 | + while (0); | ||
1331 | + do | ||
1332 | + { | ||
1333 | + USItype __m0 = (X_f[3]), __m1 = (Y_f[0]); | ||
1334 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_c_f1):"%r" (X_f[3]), | ||
1335 | + "r" (Y_f | ||
1336 | + [0])); | ||
1337 | + (_c_f0) = __m0 * __m1; | ||
1338 | + } | ||
1339 | + while (0); | ||
1340 | + do | ||
1341 | + { | ||
1342 | + USItype __m0 = (X_f[1]), __m1 = (Y_f[2]); | ||
1343 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_d_f1):"%r" (X_f[1]), | ||
1344 | + "r" (Y_f | ||
1345 | + [2])); | ||
1346 | + (_d_f0) = __m0 * __m1; | ||
1347 | + } | ||
1348 | + while (0); | ||
1349 | + do | ||
1350 | + { | ||
1351 | + USItype __m0 = (X_f[2]), __m1 = (Y_f[1]); | ||
1352 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_e_f1):"%r" (X_f[2]), | ||
1353 | + "r" (Y_f | ||
1354 | + [1])); | ||
1355 | + (_e_f0) = __m0 * __m1; | ||
1356 | + } | ||
1357 | + while (0); | ||
1358 | + do | ||
1359 | + { | ||
1360 | + unsigned long _c1, _c2; | ||
1361 | + (_z_f[3]) = _b_f0 + (_z_f[3]); | ||
1362 | + _c1 = (_z_f[3]) < _b_f0; | ||
1363 | + (_z_f[4]) = _b_f1 + (_z_f[4]); | ||
1364 | + _c2 = (_z_f[4]) < _b_f1; | ||
1365 | + (_z_f[4]) += _c1; | ||
1366 | + _c2 |= (_z_f[4]) < _c1; | ||
1367 | + (_z_f[5]) = 0 + 0 + _c2; | ||
1368 | + } | ||
1369 | + while (0); | ||
1370 | + do | ||
1371 | + { | ||
1372 | + unsigned long _c1, _c2; | ||
1373 | + (_z_f[3]) = _c_f0 + (_z_f[3]); | ||
1374 | + _c1 = (_z_f[3]) < _c_f0; | ||
1375 | + (_z_f[4]) = _c_f1 + (_z_f[4]); | ||
1376 | + _c2 = (_z_f[4]) < _c_f1; | ||
1377 | + (_z_f[4]) += _c1; | ||
1378 | + _c2 |= (_z_f[4]) < _c1; | ||
1379 | + (_z_f[5]) = 0 + (_z_f[5]) + _c2; | ||
1380 | + } | ||
1381 | + while (0); | ||
1382 | + do | ||
1383 | + { | ||
1384 | + unsigned long _c1, _c2; | ||
1385 | + (_z_f[3]) = _d_f0 + (_z_f[3]); | ||
1386 | + _c1 = (_z_f[3]) < _d_f0; | ||
1387 | + (_z_f[4]) = _d_f1 + (_z_f[4]); | ||
1388 | + _c2 = (_z_f[4]) < _d_f1; | ||
1389 | + (_z_f[4]) += _c1; | ||
1390 | + _c2 |= (_z_f[4]) < _c1; | ||
1391 | + (_z_f[5]) = 0 + (_z_f[5]) + _c2; | ||
1392 | + } | ||
1393 | + while (0); | ||
1394 | + do | ||
1395 | + { | ||
1396 | + unsigned long _c1, _c2; | ||
1397 | + (_z_f[3]) = _e_f0 + (_z_f[3]); | ||
1398 | + _c1 = (_z_f[3]) < _e_f0; | ||
1399 | + (_z_f[4]) = _e_f1 + (_z_f[4]); | ||
1400 | + _c2 = (_z_f[4]) < _e_f1; | ||
1401 | + (_z_f[4]) += _c1; | ||
1402 | + _c2 |= (_z_f[4]) < _c1; | ||
1403 | + (_z_f[5]) = 0 + (_z_f[5]) + _c2; | ||
1404 | + } | ||
1405 | + while (0); | ||
1406 | + do | ||
1407 | + { | ||
1408 | + USItype __m0 = (X_f[2]), __m1 = (Y_f[2]); | ||
1409 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_b_f1):"%r" (X_f[2]), | ||
1410 | + "r" (Y_f | ||
1411 | + [2])); | ||
1412 | + (_b_f0) = __m0 * __m1; | ||
1413 | + } | ||
1414 | + while (0); | ||
1415 | + do | ||
1416 | + { | ||
1417 | + USItype __m0 = (X_f[1]), __m1 = (Y_f[3]); | ||
1418 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_c_f1):"%r" (X_f[1]), | ||
1419 | + "r" (Y_f | ||
1420 | + [3])); | ||
1421 | + (_c_f0) = __m0 * __m1; | ||
1422 | + } | ||
1423 | + while (0); | ||
1424 | + do | ||
1425 | + { | ||
1426 | + USItype __m0 = (X_f[3]), __m1 = (Y_f[1]); | ||
1427 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_d_f1):"%r" (X_f[3]), | ||
1428 | + "r" (Y_f | ||
1429 | + [1])); | ||
1430 | + (_d_f0) = __m0 * __m1; | ||
1431 | + } | ||
1432 | + while (0); | ||
1433 | + do | ||
1434 | + { | ||
1435 | + USItype __m0 = (X_f[2]), __m1 = (Y_f[3]); | ||
1436 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_e_f1):"%r" (X_f[2]), | ||
1437 | + "r" (Y_f | ||
1438 | + [3])); | ||
1439 | + (_e_f0) = __m0 * __m1; | ||
1440 | + } | ||
1441 | + while (0); | ||
1442 | + do | ||
1443 | + { | ||
1444 | + USItype __m0 = (X_f[3]), __m1 = (Y_f[2]); | ||
1445 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_f_f1):"%r" (X_f[3]), | ||
1446 | + "r" (Y_f | ||
1447 | + [2])); | ||
1448 | + (_f_f0) = __m0 * __m1; | ||
1449 | + } | ||
1450 | + while (0); | ||
1451 | + do | ||
1452 | + { | ||
1453 | + unsigned long _c1, _c2; | ||
1454 | + (_z_f[4]) = _b_f0 + (_z_f[4]); | ||
1455 | + _c1 = (_z_f[4]) < _b_f0; | ||
1456 | + (_z_f[5]) = _b_f1 + (_z_f[5]); | ||
1457 | + _c2 = (_z_f[5]) < _b_f1; | ||
1458 | + (_z_f[5]) += _c1; | ||
1459 | + _c2 |= (_z_f[5]) < _c1; | ||
1460 | + (_z_f[6]) = 0 + 0 + _c2; | ||
1461 | + } | ||
1462 | + while (0); | ||
1463 | + do | ||
1464 | + { | ||
1465 | + unsigned long _c1, _c2; | ||
1466 | + (_z_f[4]) = _c_f0 + (_z_f[4]); | ||
1467 | + _c1 = (_z_f[4]) < _c_f0; | ||
1468 | + (_z_f[5]) = _c_f1 + (_z_f[5]); | ||
1469 | + _c2 = (_z_f[5]) < _c_f1; | ||
1470 | + (_z_f[5]) += _c1; | ||
1471 | + _c2 |= (_z_f[5]) < _c1; | ||
1472 | + (_z_f[6]) = 0 + (_z_f[6]) + _c2; | ||
1473 | + } | ||
1474 | + while (0); | ||
1475 | + do | ||
1476 | + { | ||
1477 | + unsigned long _c1, _c2; | ||
1478 | + (_z_f[4]) = _d_f0 + (_z_f[4]); | ||
1479 | + _c1 = (_z_f[4]) < _d_f0; | ||
1480 | + (_z_f[5]) = _d_f1 + (_z_f[5]); | ||
1481 | + _c2 = (_z_f[5]) < _d_f1; | ||
1482 | + (_z_f[5]) += _c1; | ||
1483 | + _c2 |= (_z_f[5]) < _c1; | ||
1484 | + (_z_f[6]) = 0 + (_z_f[6]) + _c2; | ||
1485 | + } | ||
1486 | + while (0); | ||
1487 | + do | ||
1488 | + { | ||
1489 | + unsigned long _c1, _c2; | ||
1490 | + (_z_f[5]) = _e_f0 + (_z_f[5]); | ||
1491 | + _c1 = (_z_f[5]) < _e_f0; | ||
1492 | + (_z_f[6]) = _e_f1 + (_z_f[6]); | ||
1493 | + _c2 = (_z_f[6]) < _e_f1; | ||
1494 | + (_z_f[6]) += _c1; | ||
1495 | + _c2 |= (_z_f[6]) < _c1; | ||
1496 | + (_z_f[7]) = 0 + 0 + _c2; | ||
1497 | + } | ||
1498 | + while (0); | ||
1499 | + do | ||
1500 | + { | ||
1501 | + unsigned long _c1, _c2; | ||
1502 | + (_z_f[5]) = _f_f0 + (_z_f[5]); | ||
1503 | + _c1 = (_z_f[5]) < _f_f0; | ||
1504 | + (_z_f[6]) = _f_f1 + (_z_f[6]); | ||
1505 | + _c2 = (_z_f[6]) < _f_f1; | ||
1506 | + (_z_f[6]) += _c1; | ||
1507 | + _c2 |= (_z_f[6]) < _c1; | ||
1508 | + (_z_f[7]) = 0 + (_z_f[7]) + _c2; | ||
1509 | + } | ||
1510 | + while (0); | ||
1511 | + do | ||
1512 | + { | ||
1513 | + USItype __m0 = (X_f[3]), __m1 = (Y_f[3]); | ||
1514 | + __asm__ ("mulhwu %0,%1,%2": "=r" (_b_f1):"%r" (X_f[3]), | ||
1515 | + "r" (Y_f | ||
1516 | + [3])); | ||
1517 | + (_b_f0) = __m0 * __m1; | ||
1518 | + } | ||
1519 | + while (0); | ||
1520 | + do | ||
1521 | + { | ||
1522 | + if (__builtin_constant_p ((_z_f[7])) && ((_z_f[7])) == 0) | ||
1523 | + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2": "=r" ((_z_f[7])), "=&r" ((_z_f[6])):"r" (_b_f1), "%r" (_b_f0), | ||
1524 | + "rI" ((_z_f | ||
1525 | + [6]))); | ||
1526 | + else if (__builtin_constant_p ((_z_f[7])) | ||
1527 | + && ((_z_f[7])) == ~(USItype) 0) | ||
1528 | + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2": "=r" ((_z_f[7])), "=&r" ((_z_f[6])):"r" (_b_f1), "%r" (_b_f0), | ||
1529 | + "rI" ((_z_f | ||
1530 | + [6]))); | ||
1531 | + else | ||
1532 | + __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3": "=r" ((_z_f[7])), "=&r" ((_z_f[6])):"%r" (_b_f1), "r" ((_z_f[7])), "%r" (_b_f0), | ||
1533 | + "rI" ((_z_f | ||
1534 | + [6]))); | ||
1535 | + } | ||
1536 | + while (0); | ||
1537 | + do | ||
1538 | + { | ||
1539 | + long _up, _down, _skip, _i; | ||
1540 | + unsigned long _s; | ||
1541 | + _skip = ((3 + 113) - 1) / 32; | ||
1542 | + _down = ((3 + 113) - 1) % 32; | ||
1543 | + _up = 32 - _down; | ||
1544 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
1545 | + _s |= _z_f[_i]; | ||
1546 | + if (!_down) | ||
1547 | + for (_i = 0; _i <= 7 - _skip; ++_i) | ||
1548 | + _z_f[_i] = _z_f[_i + _skip]; | ||
1549 | + else | ||
1550 | + { | ||
1551 | + _s |= _z_f[_i] << _up; | ||
1552 | + for (_i = 0; _i < 7 - _skip; ++_i) | ||
1553 | + _z_f[_i] = | ||
1554 | + _z_f[_i + _skip] >> _down | _z_f[_i + _skip + | ||
1555 | + 1] << _up; | ||
1556 | + _z_f[_i++] = _z_f[7] >> _down; | ||
1557 | + } | ||
1558 | + for (; _i < 8; ++_i) | ||
1559 | + _z_f[_i] = 0; | ||
1560 | + _z_f[0] |= (_s != 0); | ||
1561 | + } | ||
1562 | + while (0); | ||
1563 | + (U_f[3] = (_z_f[3]), U_f[2] = (_z_f[2]), U_f[1] = | ||
1564 | + (_z_f[1]), U_f[0] = (_z_f[0])); | ||
1565 | + } | ||
1566 | + while (0); | ||
1567 | + if (((U_f[3]) & ((unsigned long) 1 << ((3 + 113) % 32)))) | ||
1568 | + do | ||
1569 | + { | ||
1570 | + int _sticky; | ||
1571 | + do | ||
1572 | + { | ||
1573 | + long _up, _down, _skip, _i; | ||
1574 | + unsigned long _s; | ||
1575 | + _skip = (1) / 32; | ||
1576 | + _down = (1) % 32; | ||
1577 | + _up = 32 - _down; | ||
1578 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
1579 | + _s |= U_f[_i]; | ||
1580 | + if (!_down) | ||
1581 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
1582 | + U_f[_i] = U_f[_i + _skip]; | ||
1583 | + else | ||
1584 | + { | ||
1585 | + _s |= U_f[_i] << _up; | ||
1586 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
1587 | + U_f[_i] = | ||
1588 | + U_f[_i + _skip] >> _down | U_f[_i + _skip + | ||
1589 | + 1] << _up; | ||
1590 | + U_f[_i++] = U_f[3] >> _down; | ||
1591 | + } | ||
1592 | + for (; _i < 4; ++_i) | ||
1593 | + U_f[_i] = 0; | ||
1594 | + _sticky = (_s != 0); | ||
1595 | + } | ||
1596 | + while (0); | ||
1597 | + U_f[0] |= _sticky; | ||
1598 | + } | ||
1599 | + while (0); | ||
1600 | + else | ||
1601 | + U_e--; | ||
1602 | + break; | ||
1603 | + case (((3) << 2) | (3)): | ||
1604 | + do | ||
1605 | + { | ||
1606 | + if (((X_f[3]) & ((unsigned long) 1 << (113 - 2) % 32)) | ||
1607 | + && !((Y_f[3]) & ((unsigned long) 1 << (113 - 2) % 32))) | ||
1608 | + { | ||
1609 | + U_s = Y_s; | ||
1610 | + (U_f[0] = Y_f[0], U_f[1] = Y_f[1], U_f[2] = Y_f[2], U_f[3] = | ||
1611 | + Y_f[3]); | ||
1612 | + } | ||
1613 | + else | ||
1614 | + { | ||
1615 | + U_s = X_s; | ||
1616 | + (U_f[0] = X_f[0], U_f[1] = X_f[1], U_f[2] = X_f[2], U_f[3] = | ||
1617 | + X_f[3]); | ||
1618 | + } | ||
1619 | + U_c = 3; | ||
1620 | + } | ||
1621 | + while (0); | ||
1622 | + break; | ||
1623 | + case (((3) << 2) | (0)): | ||
1624 | + case (((3) << 2) | (2)): | ||
1625 | + case (((3) << 2) | (1)): | ||
1626 | + U_s = X_s; | ||
1627 | + case (((2) << 2) | (2)): | ||
1628 | + case (((2) << 2) | (0)): | ||
1629 | + case (((1) << 2) | (0)): | ||
1630 | + case (((1) << 2) | (1)): | ||
1631 | + (U_f[0] = X_f[0], U_f[1] = X_f[1], U_f[2] = X_f[2], U_f[3] = | ||
1632 | + X_f[3]); | ||
1633 | + U_c = X_c; | ||
1634 | + break; | ||
1635 | + case (((0) << 2) | (3)): | ||
1636 | + case (((2) << 2) | (3)): | ||
1637 | + case (((1) << 2) | (3)): | ||
1638 | + U_s = Y_s; | ||
1639 | + case (((0) << 2) | (2)): | ||
1640 | + case (((0) << 2) | (1)): | ||
1641 | + (U_f[0] = Y_f[0], U_f[1] = Y_f[1], U_f[2] = Y_f[2], U_f[3] = | ||
1642 | + Y_f[3]); | ||
1643 | + U_c = Y_c; | ||
1644 | + break; | ||
1645 | + case (((2) << 2) | (1)): | ||
1646 | + case (((1) << 2) | (2)): | ||
1647 | + U_s = 0; | ||
1648 | + U_c = 3; | ||
1649 | + (U_f[3] = | ||
1650 | + ((((unsigned long) 1 << (113 - 2) % 32) << 1) - 1), U_f[2] = | ||
1651 | + -1, U_f[1] = -1, U_f[0] = -1); | ||
1652 | + _fex |= (0); | ||
1653 | + break; | ||
1654 | + default: | ||
1655 | + abort (); | ||
1656 | + } | ||
1657 | + } | ||
1658 | + while (0); | ||
1659 | + | ||
1660 | +/* FP_PACK_Q(u,U) */ | ||
1661 | + do | ||
1662 | + { | ||
1663 | + do | ||
1664 | + { | ||
1665 | + switch (U_c) | ||
1666 | + { | ||
1667 | + case 0: | ||
1668 | + U_e += 16383; | ||
1669 | + if (U_e > 0) | ||
1670 | + { | ||
1671 | + do | ||
1672 | + { | ||
1673 | + if ((U_f[0]) & 7) | ||
1674 | + _fex |= (0); | ||
1675 | + switch (0) | ||
1676 | + { | ||
1677 | + case 0: | ||
1678 | + do | ||
1679 | + { | ||
1680 | + if (((U_f[0]) & 15) != ((unsigned long) 1 << 2)) | ||
1681 | + do | ||
1682 | + { | ||
1683 | + unsigned long _t; | ||
1684 | + _t = | ||
1685 | + ((U_f[0] += | ||
1686 | + ((unsigned long) 1 << 2)) < | ||
1687 | + ((unsigned long) 1 << 2)); | ||
1688 | + U_f[1] += _t; | ||
1689 | + _t = (U_f[1] < _t); | ||
1690 | + U_f[2] += _t; | ||
1691 | + _t = (U_f[2] < _t); | ||
1692 | + U_f[3] += _t; | ||
1693 | + } | ||
1694 | + while (0); | ||
1695 | + } | ||
1696 | + while (0); | ||
1697 | + break; | ||
1698 | + case 1: | ||
1699 | + (void) 0; | ||
1700 | + break; | ||
1701 | + case 2: | ||
1702 | + do | ||
1703 | + { | ||
1704 | + if (!U_s && ((U_f[0]) & 7)) | ||
1705 | + do | ||
1706 | + { | ||
1707 | + unsigned long _t; | ||
1708 | + _t = | ||
1709 | + ((U_f[0] += | ||
1710 | + ((unsigned long) 1 << 3)) < | ||
1711 | + ((unsigned long) 1 << 3)); | ||
1712 | + U_f[1] += _t; | ||
1713 | + _t = (U_f[1] < _t); | ||
1714 | + U_f[2] += _t; | ||
1715 | + _t = (U_f[2] < _t); | ||
1716 | + U_f[3] += _t; | ||
1717 | + } | ||
1718 | + while (0); | ||
1719 | + } | ||
1720 | + while (0); | ||
1721 | + break; | ||
1722 | + case 3: | ||
1723 | + do | ||
1724 | + { | ||
1725 | + if (U_s && ((U_f[0]) & 7)) | ||
1726 | + do | ||
1727 | + { | ||
1728 | + unsigned long _t; | ||
1729 | + _t = | ||
1730 | + ((U_f[0] += | ||
1731 | + ((unsigned long) 1 << 3)) < | ||
1732 | + ((unsigned long) 1 << 3)); | ||
1733 | + U_f[1] += _t; | ||
1734 | + _t = (U_f[1] < _t); | ||
1735 | + U_f[2] += _t; | ||
1736 | + _t = (U_f[2] < _t); | ||
1737 | + U_f[3] += _t; | ||
1738 | + } | ||
1739 | + while (0); | ||
1740 | + } | ||
1741 | + while (0); | ||
1742 | + break; | ||
1743 | + } | ||
1744 | + } | ||
1745 | + while (0); | ||
1746 | + if (((U_f[3]) & ((unsigned long) 1 << ((3 + 113) % 32)))) | ||
1747 | + { | ||
1748 | + ((U_f[3]) &= ~((unsigned long) 1 << ((3 + 113) % 32))); | ||
1749 | + U_e++; | ||
1750 | + } | ||
1751 | + do | ||
1752 | + { | ||
1753 | + long _up, _down, _skip, _i; | ||
1754 | + _skip = (3) / 32; | ||
1755 | + _down = (3) % 32; | ||
1756 | + _up = 32 - _down; | ||
1757 | + if (!_down) | ||
1758 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
1759 | + U_f[_i] = U_f[_i + _skip]; | ||
1760 | + else | ||
1761 | + { | ||
1762 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
1763 | + U_f[_i] = | ||
1764 | + U_f[_i + _skip] >> _down | U_f[_i + _skip + | ||
1765 | + 1] << _up; | ||
1766 | + U_f[_i++] = U_f[3] >> _down; | ||
1767 | + } | ||
1768 | + for (; _i < 4; ++_i) | ||
1769 | + U_f[_i] = 0; | ||
1770 | + } | ||
1771 | + while (0); | ||
1772 | + if (U_e >= 32767) | ||
1773 | + { | ||
1774 | + switch (0) | ||
1775 | + { | ||
1776 | + case 0: | ||
1777 | + U_c = 2; | ||
1778 | + break; | ||
1779 | + case 2: | ||
1780 | + if (!U_s) | ||
1781 | + U_c = 2; | ||
1782 | + break; | ||
1783 | + case 3: | ||
1784 | + if (U_s) | ||
1785 | + U_c = 2; | ||
1786 | + break; | ||
1787 | + } | ||
1788 | + if (U_c == 2) | ||
1789 | + { | ||
1790 | + U_e = 32767; | ||
1791 | + (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 0); | ||
1792 | + } | ||
1793 | + else | ||
1794 | + { | ||
1795 | + U_e = 32767 - 1; | ||
1796 | + (U_f[3] = (~(signed long) 0), U_f[2] = | ||
1797 | + (~(signed long) 0), U_f[1] = | ||
1798 | + (~(signed long) 0), U_f[0] = (~(signed long) 0)); | ||
1799 | + } _fex |= (0); | ||
1800 | + _fex |= (0); | ||
1801 | + } | ||
1802 | + } | ||
1803 | + else | ||
1804 | + { | ||
1805 | + U_e = -U_e + 1; | ||
1806 | + if (U_e <= (3 + 113)) | ||
1807 | + { | ||
1808 | + do | ||
1809 | + { | ||
1810 | + int _sticky; | ||
1811 | + do | ||
1812 | + { | ||
1813 | + long _up, _down, _skip, _i; | ||
1814 | + unsigned long _s; | ||
1815 | + _skip = (U_e) / 32; | ||
1816 | + _down = (U_e) % 32; | ||
1817 | + _up = 32 - _down; | ||
1818 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
1819 | + _s |= U_f[_i]; | ||
1820 | + if (!_down) | ||
1821 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
1822 | + U_f[_i] = U_f[_i + _skip]; | ||
1823 | + else | ||
1824 | + { | ||
1825 | + _s |= U_f[_i] << _up; | ||
1826 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
1827 | + U_f[_i] = | ||
1828 | + U_f[_i + _skip] >> _down | U_f[_i + | ||
1829 | + _skip + | ||
1830 | + 1] << | ||
1831 | + _up; | ||
1832 | + U_f[_i++] = U_f[3] >> _down; | ||
1833 | + } | ||
1834 | + for (; _i < 4; ++_i) | ||
1835 | + U_f[_i] = 0; | ||
1836 | + _sticky = (_s != 0); | ||
1837 | + } | ||
1838 | + while (0); | ||
1839 | + U_f[0] |= _sticky; | ||
1840 | + } | ||
1841 | + while (0); | ||
1842 | + do | ||
1843 | + { | ||
1844 | + if ((U_f[0]) & 7) | ||
1845 | + _fex |= (0); | ||
1846 | + switch (0) | ||
1847 | + { | ||
1848 | + case 0: | ||
1849 | + do | ||
1850 | + { | ||
1851 | + if (((U_f[0]) & 15) != | ||
1852 | + ((unsigned long) 1 << 2)) | ||
1853 | + do | ||
1854 | + { | ||
1855 | + unsigned long _t; | ||
1856 | + _t = | ||
1857 | + ((U_f[0] += | ||
1858 | + ((unsigned long) 1 << 2)) < | ||
1859 | + ((unsigned long) 1 << 2)); | ||
1860 | + U_f[1] += _t; | ||
1861 | + _t = (U_f[1] < _t); | ||
1862 | + U_f[2] += _t; | ||
1863 | + _t = (U_f[2] < _t); | ||
1864 | + U_f[3] += _t; | ||
1865 | + } | ||
1866 | + while (0); | ||
1867 | + } | ||
1868 | + while (0); | ||
1869 | + break; | ||
1870 | + case 1: | ||
1871 | + (void) 0; | ||
1872 | + break; | ||
1873 | + case 2: | ||
1874 | + do | ||
1875 | + { | ||
1876 | + if (!U_s && ((U_f[0]) & 7)) | ||
1877 | + do | ||
1878 | + { | ||
1879 | + unsigned long _t; | ||
1880 | + _t = | ||
1881 | + ((U_f[0] += | ||
1882 | + ((unsigned long) 1 << 3)) < | ||
1883 | + ((unsigned long) 1 << 3)); | ||
1884 | + U_f[1] += _t; | ||
1885 | + _t = (U_f[1] < _t); | ||
1886 | + U_f[2] += _t; | ||
1887 | + _t = (U_f[2] < _t); | ||
1888 | + U_f[3] += _t; | ||
1889 | + } | ||
1890 | + while (0); | ||
1891 | + } | ||
1892 | + while (0); | ||
1893 | + break; | ||
1894 | + case 3: | ||
1895 | + do | ||
1896 | + { | ||
1897 | + if (U_s && ((U_f[0]) & 7)) | ||
1898 | + do | ||
1899 | + { | ||
1900 | + unsigned long _t; | ||
1901 | + _t = | ||
1902 | + ((U_f[0] += | ||
1903 | + ((unsigned long) 1 << 3)) < | ||
1904 | + ((unsigned long) 1 << 3)); | ||
1905 | + U_f[1] += _t; | ||
1906 | + _t = (U_f[1] < _t); | ||
1907 | + U_f[2] += _t; | ||
1908 | + _t = (U_f[2] < _t); | ||
1909 | + U_f[3] += _t; | ||
1910 | + } | ||
1911 | + while (0); | ||
1912 | + } | ||
1913 | + while (0); | ||
1914 | + break; | ||
1915 | + } | ||
1916 | + } | ||
1917 | + while (0); | ||
1918 | + if ((U_f[3]) & | ||
1919 | + (((unsigned long) 1 << ((3 + 113) % 32)) >> 1)) | ||
1920 | + { | ||
1921 | + U_e = 1; | ||
1922 | + (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 0); | ||
1923 | + } | ||
1924 | + else | ||
1925 | + { | ||
1926 | + U_e = 0; | ||
1927 | + do | ||
1928 | + { | ||
1929 | + long _up, _down, _skip, _i; | ||
1930 | + _skip = (3) / 32; | ||
1931 | + _down = (3) % 32; | ||
1932 | + _up = 32 - _down; | ||
1933 | + if (!_down) | ||
1934 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
1935 | + U_f[_i] = U_f[_i + _skip]; | ||
1936 | + else | ||
1937 | + { | ||
1938 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
1939 | + U_f[_i] = | ||
1940 | + U_f[_i + _skip] >> _down | U_f[_i + | ||
1941 | + _skip + | ||
1942 | + 1] << | ||
1943 | + _up; | ||
1944 | + U_f[_i++] = U_f[3] >> _down; | ||
1945 | + } | ||
1946 | + for (; _i < 4; ++_i) | ||
1947 | + U_f[_i] = 0; | ||
1948 | + } | ||
1949 | + while (0); | ||
1950 | + _fex |= (0); | ||
1951 | + } | ||
1952 | + } | ||
1953 | + else | ||
1954 | + { | ||
1955 | + U_e = 0; | ||
1956 | + if (!((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)) | ||
1957 | + { | ||
1958 | + (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 1); | ||
1959 | + do | ||
1960 | + { | ||
1961 | + if ((U_f[0]) & 7) | ||
1962 | + _fex |= (0); | ||
1963 | + switch (0) | ||
1964 | + { | ||
1965 | + case 0: | ||
1966 | + do | ||
1967 | + { | ||
1968 | + if (((U_f[0]) & 15) != | ||
1969 | + ((unsigned long) 1 << 2)) | ||
1970 | + do | ||
1971 | + { | ||
1972 | + unsigned long _t; | ||
1973 | + _t = | ||
1974 | + ((U_f[0] += | ||
1975 | + ((unsigned long) 1 << 2)) < | ||
1976 | + ((unsigned long) 1 << 2)); | ||
1977 | + U_f[1] += _t; | ||
1978 | + _t = (U_f[1] < _t); | ||
1979 | + U_f[2] += _t; | ||
1980 | + _t = (U_f[2] < _t); | ||
1981 | + U_f[3] += _t; | ||
1982 | + } | ||
1983 | + while (0); | ||
1984 | + } | ||
1985 | + while (0); | ||
1986 | + break; | ||
1987 | + case 1: | ||
1988 | + (void) 0; | ||
1989 | + break; | ||
1990 | + case 2: | ||
1991 | + do | ||
1992 | + { | ||
1993 | + if (!U_s && ((U_f[0]) & 7)) | ||
1994 | + do | ||
1995 | + { | ||
1996 | + unsigned long _t; | ||
1997 | + _t = | ||
1998 | + ((U_f[0] += | ||
1999 | + ((unsigned long) 1 << 3)) < | ||
2000 | + ((unsigned long) 1 << 3)); | ||
2001 | + U_f[1] += _t; | ||
2002 | + _t = (U_f[1] < _t); | ||
2003 | + U_f[2] += _t; | ||
2004 | + _t = (U_f[2] < _t); | ||
2005 | + U_f[3] += _t; | ||
2006 | + } | ||
2007 | + while (0); | ||
2008 | + } | ||
2009 | + while (0); | ||
2010 | + break; | ||
2011 | + case 3: | ||
2012 | + do | ||
2013 | + { | ||
2014 | + if (U_s && ((U_f[0]) & 7)) | ||
2015 | + do | ||
2016 | + { | ||
2017 | + unsigned long _t; | ||
2018 | + _t = | ||
2019 | + ((U_f[0] += | ||
2020 | + ((unsigned long) 1 << 3)) < | ||
2021 | + ((unsigned long) 1 << 3)); | ||
2022 | + U_f[1] += _t; | ||
2023 | + _t = (U_f[1] < _t); | ||
2024 | + U_f[2] += _t; | ||
2025 | + _t = (U_f[2] < _t); | ||
2026 | + U_f[3] += _t; | ||
2027 | + } | ||
2028 | + while (0); | ||
2029 | + } | ||
2030 | + while (0); | ||
2031 | + break; | ||
2032 | + } | ||
2033 | + } | ||
2034 | + while (0); | ||
2035 | + (U_f[0]) >>= (3); | ||
2036 | + } | ||
2037 | + _fex |= (0); | ||
2038 | + } | ||
2039 | + } | ||
2040 | + break; | ||
2041 | + case 1: | ||
2042 | + U_e = 0; | ||
2043 | + (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 0); | ||
2044 | + break; | ||
2045 | + case 2: | ||
2046 | + U_e = 32767; | ||
2047 | + (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 0); | ||
2048 | + break; | ||
2049 | + case 3: | ||
2050 | + U_e = 32767; | ||
2051 | + if (!1) | ||
2052 | + { | ||
2053 | + (U_f[3] = | ||
2054 | + ((((unsigned long) 1 << (113 - 2) % 32) << 1) - 1), | ||
2055 | + U_f[2] = -1, U_f[1] = -1, U_f[0] = -1); | ||
2056 | + U_s = 0; | ||
2057 | + } | ||
2058 | + else | ||
2059 | + (U_f[3]) |= ((unsigned long) 1 << (113 - 2) % 32); | ||
2060 | + break; | ||
2061 | + } | ||
2062 | + } | ||
2063 | + while (0); | ||
2064 | + do | ||
2065 | + { | ||
2066 | + union _FP_UNION_Q _flo; | ||
2067 | + _flo.bits.frac0 = U_f[0]; | ||
2068 | + _flo.bits.frac1 = U_f[1]; | ||
2069 | + _flo.bits.frac2 = U_f[2]; | ||
2070 | + _flo.bits.frac3 = U_f[3]; | ||
2071 | + _flo.bits.exp = U_e; | ||
2072 | + _flo.bits.sign = U_s; | ||
2073 | + (u) = _flo.flt; | ||
2074 | + } | ||
2075 | + while (0); | ||
2076 | + } | ||
2077 | + while (0); | ||
2078 | + | ||
2079 | +/* FP_HANDLE_EXCEPTIONS */ | ||
2080 | + do | ||
2081 | + { | ||
2082 | + } | ||
2083 | + while (0); | ||
2084 | + | ||
2085 | + /* Subtract. */ | ||
2086 | +/* FP_INIT_ROUNDMODE */ | ||
2087 | + do | ||
2088 | + { | ||
2089 | + } | ||
2090 | + while (0); | ||
2091 | + | ||
2092 | +/* FP_UNPACK_SEMIRAW_Q(U,u) */ | ||
2093 | + do | ||
2094 | + { | ||
2095 | + do | ||
2096 | + { | ||
2097 | + union _FP_UNION_Q _flo; | ||
2098 | + _flo.flt = (u); | ||
2099 | + U_f[0] = _flo.bits.frac0; | ||
2100 | + U_f[1] = _flo.bits.frac1; | ||
2101 | + U_f[2] = _flo.bits.frac2; | ||
2102 | + U_f[3] = _flo.bits.frac3; | ||
2103 | + U_e = _flo.bits.exp; | ||
2104 | + U_s = _flo.bits.sign; | ||
2105 | + } | ||
2106 | + while (0); | ||
2107 | + do | ||
2108 | + { | ||
2109 | + long _up, _down, _skip, _i; | ||
2110 | + _skip = (3) / 32; | ||
2111 | + _up = (3) % 32; | ||
2112 | + _down = 32 - _up; | ||
2113 | + if (!_up) | ||
2114 | + for (_i = 3; _i >= _skip; --_i) | ||
2115 | + U_f[_i] = U_f[_i - _skip]; | ||
2116 | + else | ||
2117 | + { | ||
2118 | + for (_i = 3; _i > _skip; --_i) | ||
2119 | + U_f[_i] = | ||
2120 | + U_f[_i - _skip] << _up | U_f[_i - _skip - 1] >> _down; | ||
2121 | + U_f[_i--] = U_f[0] << _up; | ||
2122 | + } | ||
2123 | + for (; _i >= 0; --_i) | ||
2124 | + U_f[_i] = 0; | ||
2125 | + } | ||
2126 | + while (0); | ||
2127 | + } | ||
2128 | + while (0); | ||
2129 | + | ||
2130 | +/* FP_UNPACK_SEMIRAW_Q(Z,z) */ | ||
2131 | + do | ||
2132 | + { | ||
2133 | + do | ||
2134 | + { | ||
2135 | + union _FP_UNION_Q _flo; | ||
2136 | + _flo.flt = (z); | ||
2137 | + Z_f[0] = _flo.bits.frac0; | ||
2138 | + Z_f[1] = _flo.bits.frac1; | ||
2139 | + Z_f[2] = _flo.bits.frac2; | ||
2140 | + Z_f[3] = _flo.bits.frac3; | ||
2141 | + Z_e = _flo.bits.exp; | ||
2142 | + Z_s = _flo.bits.sign; | ||
2143 | + } | ||
2144 | + while (0); | ||
2145 | + do | ||
2146 | + { | ||
2147 | + long _up, _down, _skip, _i; | ||
2148 | + _skip = (3) / 32; | ||
2149 | + _up = (3) % 32; | ||
2150 | + _down = 32 - _up; | ||
2151 | + if (!_up) | ||
2152 | + for (_i = 3; _i >= _skip; --_i) | ||
2153 | + Z_f[_i] = Z_f[_i - _skip]; | ||
2154 | + else | ||
2155 | + { | ||
2156 | + for (_i = 3; _i > _skip; --_i) | ||
2157 | + Z_f[_i] = | ||
2158 | + Z_f[_i - _skip] << _up | Z_f[_i - _skip - 1] >> _down; | ||
2159 | + Z_f[_i--] = Z_f[0] << _up; | ||
2160 | + } | ||
2161 | + for (; _i >= 0; --_i) | ||
2162 | + Z_f[_i] = 0; | ||
2163 | + } | ||
2164 | + while (0); | ||
2165 | + } | ||
2166 | + while (0); | ||
2167 | + | ||
2168 | +/* FP_SUB_Q(V,U,Z) */ | ||
2169 | + do | ||
2170 | + { | ||
2171 | + if (!(Z_e == 32767 && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))) | ||
2172 | + Z_s ^= 1; | ||
2173 | + do | ||
2174 | + { | ||
2175 | + if (U_s == Z_s) | ||
2176 | + { | ||
2177 | + V_s = U_s; | ||
2178 | + int ediff = U_e - Z_e; | ||
2179 | + if (ediff > 0) | ||
2180 | + { | ||
2181 | + V_e = U_e; | ||
2182 | + if (Z_e == 0) | ||
2183 | + { | ||
2184 | + if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
2185 | + { | ||
2186 | + do | ||
2187 | + { | ||
2188 | + if (U_e == 32767 | ||
2189 | + && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == | ||
2190 | + 0) | ||
2191 | + && !((U_f[3]) & | ||
2192 | + ((unsigned long) 1 << (113 - 2 + 3) % | ||
2193 | + 32))) | ||
2194 | + _fex |= (0); | ||
2195 | + } | ||
2196 | + while (0); | ||
2197 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
2198 | + U_f[2], V_f[3] = U_f[3]); | ||
2199 | + goto add_done; | ||
2200 | + } | ||
2201 | + else | ||
2202 | + { | ||
2203 | + _fex |= (0); | ||
2204 | + ediff--; | ||
2205 | + if (ediff == 0) | ||
2206 | + { | ||
2207 | + do | ||
2208 | + { | ||
2209 | + unsigned long _c1, _c2, _c3; | ||
2210 | + V_f[0] = U_f[0] + Z_f[0]; | ||
2211 | + _c1 = V_f[0] < U_f[0]; | ||
2212 | + V_f[1] = U_f[1] + Z_f[1]; | ||
2213 | + _c2 = V_f[1] < U_f[1]; | ||
2214 | + V_f[1] += _c1; | ||
2215 | + _c2 |= V_f[1] < _c1; | ||
2216 | + V_f[2] = U_f[2] + Z_f[2]; | ||
2217 | + _c3 = V_f[2] < U_f[2]; | ||
2218 | + V_f[2] += _c2; | ||
2219 | + _c3 |= V_f[2] < _c2; | ||
2220 | + V_f[3] = U_f[3] + Z_f[3] + _c3; | ||
2221 | + } | ||
2222 | + while (0); | ||
2223 | + goto add3; | ||
2224 | + } | ||
2225 | + if (U_e == 32767) | ||
2226 | + { | ||
2227 | + do | ||
2228 | + { | ||
2229 | + if (U_e == 32767 | ||
2230 | + && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) | ||
2231 | + == 0) | ||
2232 | + && !((U_f[3]) & | ||
2233 | + ((unsigned long) 1 << (113 - 2 + 3) | ||
2234 | + % 32))) | ||
2235 | + _fex |= (0); | ||
2236 | + } | ||
2237 | + while (0); | ||
2238 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
2239 | + U_f[2], V_f[3] = U_f[3]); | ||
2240 | + goto add_done; | ||
2241 | + } | ||
2242 | + goto add1; | ||
2243 | + } | ||
2244 | + } | ||
2245 | + else if (U_e == 32767) | ||
2246 | + { | ||
2247 | + do | ||
2248 | + { | ||
2249 | + if (U_e == 32767 | ||
2250 | + && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0) | ||
2251 | + && !((U_f[3]) & | ||
2252 | + ((unsigned long) 1 << (113 - 2 + 3) % 32))) | ||
2253 | + _fex |= (0); | ||
2254 | + } | ||
2255 | + while (0); | ||
2256 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
2257 | + U_f[2], V_f[3] = U_f[3]); | ||
2258 | + goto add_done; | ||
2259 | + } | ||
2260 | + (Z_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32); | ||
2261 | + add1:if (ediff <= (3 + 113)) | ||
2262 | + do | ||
2263 | + { | ||
2264 | + int _sticky; | ||
2265 | + do | ||
2266 | + { | ||
2267 | + long _up, _down, _skip, _i; | ||
2268 | + unsigned long _s; | ||
2269 | + _skip = (ediff) / 32; | ||
2270 | + _down = (ediff) % 32; | ||
2271 | + _up = 32 - _down; | ||
2272 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
2273 | + _s |= Z_f[_i]; | ||
2274 | + if (!_down) | ||
2275 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
2276 | + Z_f[_i] = Z_f[_i + _skip]; | ||
2277 | + else | ||
2278 | + { | ||
2279 | + _s |= Z_f[_i] << _up; | ||
2280 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
2281 | + Z_f[_i] = | ||
2282 | + Z_f[_i + _skip] >> _down | Z_f[_i + | ||
2283 | + _skip + | ||
2284 | + 1] << _up; | ||
2285 | + Z_f[_i++] = Z_f[3] >> _down; | ||
2286 | + } | ||
2287 | + for (; _i < 4; ++_i) | ||
2288 | + Z_f[_i] = 0; | ||
2289 | + _sticky = (_s != 0); | ||
2290 | + } | ||
2291 | + while (0); | ||
2292 | + Z_f[0] |= _sticky; | ||
2293 | + } | ||
2294 | + while (0); | ||
2295 | + else if (!((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
2296 | + (Z_f[3] = 0, Z_f[2] = 0, Z_f[1] = 0, Z_f[0] = 1); | ||
2297 | + do | ||
2298 | + { | ||
2299 | + unsigned long _c1, _c2, _c3; | ||
2300 | + V_f[0] = U_f[0] + Z_f[0]; | ||
2301 | + _c1 = V_f[0] < U_f[0]; | ||
2302 | + V_f[1] = U_f[1] + Z_f[1]; | ||
2303 | + _c2 = V_f[1] < U_f[1]; | ||
2304 | + V_f[1] += _c1; | ||
2305 | + _c2 |= V_f[1] < _c1; | ||
2306 | + V_f[2] = U_f[2] + Z_f[2]; | ||
2307 | + _c3 = V_f[2] < U_f[2]; | ||
2308 | + V_f[2] += _c2; | ||
2309 | + _c3 |= V_f[2] < _c2; | ||
2310 | + V_f[3] = U_f[3] + Z_f[3] + _c3; | ||
2311 | + } | ||
2312 | + while (0); | ||
2313 | + } | ||
2314 | + else if (ediff < 0) | ||
2315 | + { | ||
2316 | + ediff = -ediff; | ||
2317 | + V_e = Z_e; | ||
2318 | + if (U_e == 0) | ||
2319 | + { | ||
2320 | + if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)) | ||
2321 | + { | ||
2322 | + do | ||
2323 | + { | ||
2324 | + if (Z_e == 32767 | ||
2325 | + && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == | ||
2326 | + 0) | ||
2327 | + && !((Z_f[3]) & | ||
2328 | + ((unsigned long) 1 << (113 - 2 + 3) % | ||
2329 | + 32))) | ||
2330 | + _fex |= (0); | ||
2331 | + } | ||
2332 | + while (0); | ||
2333 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
2334 | + Z_f[2], V_f[3] = Z_f[3]); | ||
2335 | + goto add_done; | ||
2336 | + } | ||
2337 | + else | ||
2338 | + { | ||
2339 | + _fex |= (0); | ||
2340 | + ediff--; | ||
2341 | + if (ediff == 0) | ||
2342 | + { | ||
2343 | + do | ||
2344 | + { | ||
2345 | + unsigned long _c1, _c2, _c3; | ||
2346 | + V_f[0] = Z_f[0] + U_f[0]; | ||
2347 | + _c1 = V_f[0] < Z_f[0]; | ||
2348 | + V_f[1] = Z_f[1] + U_f[1]; | ||
2349 | + _c2 = V_f[1] < Z_f[1]; | ||
2350 | + V_f[1] += _c1; | ||
2351 | + _c2 |= V_f[1] < _c1; | ||
2352 | + V_f[2] = Z_f[2] + U_f[2]; | ||
2353 | + _c3 = V_f[2] < Z_f[2]; | ||
2354 | + V_f[2] += _c2; | ||
2355 | + _c3 |= V_f[2] < _c2; | ||
2356 | + V_f[3] = Z_f[3] + U_f[3] + _c3; | ||
2357 | + } | ||
2358 | + while (0); | ||
2359 | + goto add3; | ||
2360 | + } | ||
2361 | + if (Z_e == 32767) | ||
2362 | + { | ||
2363 | + do | ||
2364 | + { | ||
2365 | + if (Z_e == 32767 | ||
2366 | + && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) | ||
2367 | + == 0) | ||
2368 | + && !((Z_f[3]) & | ||
2369 | + ((unsigned long) 1 << (113 - 2 + 3) | ||
2370 | + % 32))) | ||
2371 | + _fex |= (0); | ||
2372 | + } | ||
2373 | + while (0); | ||
2374 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
2375 | + Z_f[2], V_f[3] = Z_f[3]); | ||
2376 | + goto add_done; | ||
2377 | + } | ||
2378 | + goto add2; | ||
2379 | + } | ||
2380 | + } | ||
2381 | + else if (Z_e == 32767) | ||
2382 | + { | ||
2383 | + do | ||
2384 | + { | ||
2385 | + if (Z_e == 32767 | ||
2386 | + && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0) | ||
2387 | + && !((Z_f[3]) & | ||
2388 | + ((unsigned long) 1 << (113 - 2 + 3) % 32))) | ||
2389 | + _fex |= (0); | ||
2390 | + } | ||
2391 | + while (0); | ||
2392 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
2393 | + Z_f[2], V_f[3] = Z_f[3]); | ||
2394 | + goto add_done; | ||
2395 | + } | ||
2396 | + (U_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32); | ||
2397 | + add2:if (ediff <= (3 + 113)) | ||
2398 | + do | ||
2399 | + { | ||
2400 | + int _sticky; | ||
2401 | + do | ||
2402 | + { | ||
2403 | + long _up, _down, _skip, _i; | ||
2404 | + unsigned long _s; | ||
2405 | + _skip = (ediff) / 32; | ||
2406 | + _down = (ediff) % 32; | ||
2407 | + _up = 32 - _down; | ||
2408 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
2409 | + _s |= U_f[_i]; | ||
2410 | + if (!_down) | ||
2411 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
2412 | + U_f[_i] = U_f[_i + _skip]; | ||
2413 | + else | ||
2414 | + { | ||
2415 | + _s |= U_f[_i] << _up; | ||
2416 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
2417 | + U_f[_i] = | ||
2418 | + U_f[_i + _skip] >> _down | U_f[_i + | ||
2419 | + _skip + | ||
2420 | + 1] << _up; | ||
2421 | + U_f[_i++] = U_f[3] >> _down; | ||
2422 | + } | ||
2423 | + for (; _i < 4; ++_i) | ||
2424 | + U_f[_i] = 0; | ||
2425 | + _sticky = (_s != 0); | ||
2426 | + } | ||
2427 | + while (0); | ||
2428 | + U_f[0] |= _sticky; | ||
2429 | + } | ||
2430 | + while (0); | ||
2431 | + else if (!((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)) | ||
2432 | + (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 1); | ||
2433 | + do | ||
2434 | + { | ||
2435 | + unsigned long _c1, _c2, _c3; | ||
2436 | + V_f[0] = Z_f[0] + U_f[0]; | ||
2437 | + _c1 = V_f[0] < Z_f[0]; | ||
2438 | + V_f[1] = Z_f[1] + U_f[1]; | ||
2439 | + _c2 = V_f[1] < Z_f[1]; | ||
2440 | + V_f[1] += _c1; | ||
2441 | + _c2 |= V_f[1] < _c1; | ||
2442 | + V_f[2] = Z_f[2] + U_f[2]; | ||
2443 | + _c3 = V_f[2] < Z_f[2]; | ||
2444 | + V_f[2] += _c2; | ||
2445 | + _c3 |= V_f[2] < _c2; | ||
2446 | + V_f[3] = Z_f[3] + U_f[3] + _c3; | ||
2447 | + } | ||
2448 | + while (0); | ||
2449 | + } | ||
2450 | + else | ||
2451 | + { | ||
2452 | + if (!(((U_e + 1) & 32767) > 1)) | ||
2453 | + { | ||
2454 | + if (U_e == 0) | ||
2455 | + { | ||
2456 | + V_e = 0; | ||
2457 | + if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)) | ||
2458 | + { | ||
2459 | + if (!((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
2460 | + _fex |= (0); | ||
2461 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
2462 | + Z_f[2], V_f[3] = Z_f[3]); | ||
2463 | + goto add_done; | ||
2464 | + } | ||
2465 | + else if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
2466 | + { | ||
2467 | + _fex |= (0); | ||
2468 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
2469 | + U_f[2], V_f[3] = U_f[3]); | ||
2470 | + goto add_done; | ||
2471 | + } | ||
2472 | + else | ||
2473 | + { | ||
2474 | + _fex |= (0); | ||
2475 | + do | ||
2476 | + { | ||
2477 | + unsigned long _c1, _c2, _c3; | ||
2478 | + V_f[0] = U_f[0] + Z_f[0]; | ||
2479 | + _c1 = V_f[0] < U_f[0]; | ||
2480 | + V_f[1] = U_f[1] + Z_f[1]; | ||
2481 | + _c2 = V_f[1] < U_f[1]; | ||
2482 | + V_f[1] += _c1; | ||
2483 | + _c2 |= V_f[1] < _c1; | ||
2484 | + V_f[2] = U_f[2] + Z_f[2]; | ||
2485 | + _c3 = V_f[2] < U_f[2]; | ||
2486 | + V_f[2] += _c2; | ||
2487 | + _c3 |= V_f[2] < _c2; | ||
2488 | + V_f[3] = U_f[3] + Z_f[3] + _c3; | ||
2489 | + } | ||
2490 | + while (0); | ||
2491 | + if ((V_f[3]) & | ||
2492 | + ((unsigned long) 1 << (113 - 1 + 3) % 32)) | ||
2493 | + { | ||
2494 | + (V_f[3]) &= | ||
2495 | + ~(unsigned long) ((unsigned long) 1 << | ||
2496 | + (113 - 1 + 3) % 32); | ||
2497 | + V_e = 1; | ||
2498 | + } | ||
2499 | + goto add_done; | ||
2500 | + } | ||
2501 | + } | ||
2502 | + else | ||
2503 | + { | ||
2504 | + do | ||
2505 | + { | ||
2506 | + if (U_e == 32767 | ||
2507 | + && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == | ||
2508 | + 0) | ||
2509 | + && !((U_f[3]) & | ||
2510 | + ((unsigned long) 1 << (113 - 2 + 3) % | ||
2511 | + 32))) | ||
2512 | + _fex |= (0); | ||
2513 | + } | ||
2514 | + while (0); | ||
2515 | + do | ||
2516 | + { | ||
2517 | + if (Z_e == 32767 | ||
2518 | + && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == | ||
2519 | + 0) | ||
2520 | + && !((Z_f[3]) & | ||
2521 | + ((unsigned long) 1 << (113 - 2 + 3) % | ||
2522 | + 32))) | ||
2523 | + _fex |= (0); | ||
2524 | + } | ||
2525 | + while (0); | ||
2526 | + V_e = 32767; | ||
2527 | + if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)) | ||
2528 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
2529 | + Z_f[2], V_f[3] = Z_f[3]); | ||
2530 | + else if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
2531 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
2532 | + U_f[2], V_f[3] = U_f[3]); | ||
2533 | + else | ||
2534 | + do | ||
2535 | + { | ||
2536 | + do | ||
2537 | + { | ||
2538 | + long _up, _down, _skip, _i; | ||
2539 | + _skip = (3) / 32; | ||
2540 | + _down = (3) % 32; | ||
2541 | + _up = 32 - _down; | ||
2542 | + if (!_down) | ||
2543 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
2544 | + U_f[_i] = U_f[_i + _skip]; | ||
2545 | + else | ||
2546 | + { | ||
2547 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
2548 | + U_f[_i] = | ||
2549 | + U_f[_i + | ||
2550 | + _skip] >> _down | U_f[_i + | ||
2551 | + _skip + | ||
2552 | + 1] << | ||
2553 | + _up; | ||
2554 | + U_f[_i++] = U_f[3] >> _down; | ||
2555 | + } | ||
2556 | + for (; _i < 4; ++_i) | ||
2557 | + U_f[_i] = 0; | ||
2558 | + } | ||
2559 | + while (0); | ||
2560 | + do | ||
2561 | + { | ||
2562 | + long _up, _down, _skip, _i; | ||
2563 | + _skip = (3) / 32; | ||
2564 | + _down = (3) % 32; | ||
2565 | + _up = 32 - _down; | ||
2566 | + if (!_down) | ||
2567 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
2568 | + Z_f[_i] = Z_f[_i + _skip]; | ||
2569 | + else | ||
2570 | + { | ||
2571 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
2572 | + Z_f[_i] = | ||
2573 | + Z_f[_i + | ||
2574 | + _skip] >> _down | Z_f[_i + | ||
2575 | + _skip + | ||
2576 | + 1] << | ||
2577 | + _up; | ||
2578 | + Z_f[_i++] = Z_f[3] >> _down; | ||
2579 | + } | ||
2580 | + for (; _i < 4; ++_i) | ||
2581 | + Z_f[_i] = 0; | ||
2582 | + } | ||
2583 | + while (0); | ||
2584 | + do | ||
2585 | + { | ||
2586 | + if (((U_f[3]) & | ||
2587 | + ((unsigned long) 1 << (113 - 2) % | ||
2588 | + 32)) | ||
2589 | + && !((Z_f[3]) & | ||
2590 | + ((unsigned long) 1 << (113 - 2) % | ||
2591 | + 32))) | ||
2592 | + { | ||
2593 | + V_s = Z_s; | ||
2594 | + (V_f[0] = Z_f[0], V_f[1] = | ||
2595 | + Z_f[1], V_f[2] = Z_f[2], V_f[3] = | ||
2596 | + Z_f[3]); | ||
2597 | + } | ||
2598 | + else | ||
2599 | + { | ||
2600 | + V_s = U_s; | ||
2601 | + (V_f[0] = U_f[0], V_f[1] = | ||
2602 | + U_f[1], V_f[2] = U_f[2], V_f[3] = | ||
2603 | + U_f[3]); | ||
2604 | + } | ||
2605 | + V_c = 3; | ||
2606 | + } | ||
2607 | + while (0); | ||
2608 | + do | ||
2609 | + { | ||
2610 | + long _up, _down, _skip, _i; | ||
2611 | + _skip = (3) / 32; | ||
2612 | + _up = (3) % 32; | ||
2613 | + _down = 32 - _up; | ||
2614 | + if (!_up) | ||
2615 | + for (_i = 3; _i >= _skip; --_i) | ||
2616 | + V_f[_i] = V_f[_i - _skip]; | ||
2617 | + else | ||
2618 | + { | ||
2619 | + for (_i = 3; _i > _skip; --_i) | ||
2620 | + V_f[_i] = | ||
2621 | + V_f[_i - _skip] << _up | V_f[_i - | ||
2622 | + _skip | ||
2623 | + - | ||
2624 | + 1] >> | ||
2625 | + _down; | ||
2626 | + V_f[_i--] = V_f[0] << _up; | ||
2627 | + } | ||
2628 | + for (; _i >= 0; --_i) | ||
2629 | + V_f[_i] = 0; | ||
2630 | + } | ||
2631 | + while (0); | ||
2632 | + } | ||
2633 | + while (0); | ||
2634 | + goto add_done; | ||
2635 | + } | ||
2636 | + } | ||
2637 | + do | ||
2638 | + { | ||
2639 | + unsigned long _c1, _c2, _c3; | ||
2640 | + V_f[0] = U_f[0] + Z_f[0]; | ||
2641 | + _c1 = V_f[0] < U_f[0]; | ||
2642 | + V_f[1] = U_f[1] + Z_f[1]; | ||
2643 | + _c2 = V_f[1] < U_f[1]; | ||
2644 | + V_f[1] += _c1; | ||
2645 | + _c2 |= V_f[1] < _c1; | ||
2646 | + V_f[2] = U_f[2] + Z_f[2]; | ||
2647 | + _c3 = V_f[2] < U_f[2]; | ||
2648 | + V_f[2] += _c2; | ||
2649 | + _c3 |= V_f[2] < _c2; | ||
2650 | + V_f[3] = U_f[3] + Z_f[3] + _c3; | ||
2651 | + } | ||
2652 | + while (0); | ||
2653 | + V_e = U_e + 1; | ||
2654 | + do | ||
2655 | + { | ||
2656 | + int _sticky; | ||
2657 | + do | ||
2658 | + { | ||
2659 | + long _up, _down, _skip, _i; | ||
2660 | + unsigned long _s; | ||
2661 | + _skip = (1) / 32; | ||
2662 | + _down = (1) % 32; | ||
2663 | + _up = 32 - _down; | ||
2664 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
2665 | + _s |= V_f[_i]; | ||
2666 | + if (!_down) | ||
2667 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
2668 | + V_f[_i] = V_f[_i + _skip]; | ||
2669 | + else | ||
2670 | + { | ||
2671 | + _s |= V_f[_i] << _up; | ||
2672 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
2673 | + V_f[_i] = | ||
2674 | + V_f[_i + _skip] >> _down | V_f[_i + _skip + | ||
2675 | + 1] << _up; | ||
2676 | + V_f[_i++] = V_f[3] >> _down; | ||
2677 | + } | ||
2678 | + for (; _i < 4; ++_i) | ||
2679 | + V_f[_i] = 0; | ||
2680 | + _sticky = (_s != 0); | ||
2681 | + } | ||
2682 | + while (0); | ||
2683 | + V_f[0] |= _sticky; | ||
2684 | + } | ||
2685 | + while (0); | ||
2686 | + if (V_e == 32767) | ||
2687 | + do | ||
2688 | + { | ||
2689 | + if (0 == 0 || (0 == 2 && !V_s) || (0 == 3 && V_s)) | ||
2690 | + { | ||
2691 | + V_e = 32767; | ||
2692 | + (V_f[3] = 0, V_f[2] = 0, V_f[1] = 0, V_f[0] = 0); | ||
2693 | + } | ||
2694 | + else | ||
2695 | + { | ||
2696 | + V_e = 32767 - 1; | ||
2697 | + _fex |= (0); | ||
2698 | + _fex |= (0); | ||
2699 | + (V_f[3] = (~(signed long) 0), V_f[2] = | ||
2700 | + (~(signed long) 0), V_f[1] = | ||
2701 | + (~(signed long) 0), V_f[0] = (~(signed long) 0)); | ||
2702 | + } | ||
2703 | + } | ||
2704 | + while (0); | ||
2705 | + goto add_done; | ||
2706 | + } | ||
2707 | + add3:if ((V_f[3]) & | ||
2708 | + ((unsigned long) 1 << (113 - 1 + 3) % 32)) | ||
2709 | + { | ||
2710 | + (V_f[3]) &= | ||
2711 | + ~(unsigned long) ((unsigned long) 1 << (113 - 1 + 3) % | ||
2712 | + 32); | ||
2713 | + V_e++; | ||
2714 | + do | ||
2715 | + { | ||
2716 | + int _sticky; | ||
2717 | + do | ||
2718 | + { | ||
2719 | + long _up, _down, _skip, _i; | ||
2720 | + unsigned long _s; | ||
2721 | + _skip = (1) / 32; | ||
2722 | + _down = (1) % 32; | ||
2723 | + _up = 32 - _down; | ||
2724 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
2725 | + _s |= V_f[_i]; | ||
2726 | + if (!_down) | ||
2727 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
2728 | + V_f[_i] = V_f[_i + _skip]; | ||
2729 | + else | ||
2730 | + { | ||
2731 | + _s |= V_f[_i] << _up; | ||
2732 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
2733 | + V_f[_i] = | ||
2734 | + V_f[_i + _skip] >> _down | V_f[_i + _skip + | ||
2735 | + 1] << _up; | ||
2736 | + V_f[_i++] = V_f[3] >> _down; | ||
2737 | + } | ||
2738 | + for (; _i < 4; ++_i) | ||
2739 | + V_f[_i] = 0; | ||
2740 | + _sticky = (_s != 0); | ||
2741 | + } | ||
2742 | + while (0); | ||
2743 | + V_f[0] |= _sticky; | ||
2744 | + } | ||
2745 | + while (0); | ||
2746 | + if (V_e == 32767) | ||
2747 | + do | ||
2748 | + { | ||
2749 | + if (0 == 0 || (0 == 2 && !V_s) || (0 == 3 && V_s)) | ||
2750 | + { | ||
2751 | + V_e = 32767; | ||
2752 | + (V_f[3] = 0, V_f[2] = 0, V_f[1] = 0, V_f[0] = 0); | ||
2753 | + } | ||
2754 | + else | ||
2755 | + { | ||
2756 | + V_e = 32767 - 1; | ||
2757 | + _fex |= (0); | ||
2758 | + _fex |= (0); | ||
2759 | + (V_f[3] = (~(signed long) 0), V_f[2] = | ||
2760 | + (~(signed long) 0), V_f[1] = | ||
2761 | + (~(signed long) 0), V_f[0] = (~(signed long) 0)); | ||
2762 | + } | ||
2763 | + } | ||
2764 | + while (0); | ||
2765 | + } | ||
2766 | + add_done:; | ||
2767 | + } | ||
2768 | + else | ||
2769 | + { | ||
2770 | + int ediff = U_e - Z_e; | ||
2771 | + if (ediff > 0) | ||
2772 | + { | ||
2773 | + V_e = U_e; | ||
2774 | + V_s = U_s; | ||
2775 | + if (Z_e == 0) | ||
2776 | + { | ||
2777 | + if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
2778 | + { | ||
2779 | + do | ||
2780 | + { | ||
2781 | + if (U_e == 32767 | ||
2782 | + && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == | ||
2783 | + 0) | ||
2784 | + && !((U_f[3]) & | ||
2785 | + ((unsigned long) 1 << (113 - 2 + 3) % | ||
2786 | + 32))) | ||
2787 | + _fex |= (0); | ||
2788 | + } | ||
2789 | + while (0); | ||
2790 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
2791 | + U_f[2], V_f[3] = U_f[3]); | ||
2792 | + goto sub_done; | ||
2793 | + } | ||
2794 | + else | ||
2795 | + { | ||
2796 | + _fex |= (0); | ||
2797 | + ediff--; | ||
2798 | + if (ediff == 0) | ||
2799 | + { | ||
2800 | + do | ||
2801 | + { | ||
2802 | + unsigned long _c1, _c2, _c3; | ||
2803 | + V_f[0] = U_f[0] - Z_f[0]; | ||
2804 | + _c1 = V_f[0] > U_f[0]; | ||
2805 | + V_f[1] = U_f[1] - Z_f[1]; | ||
2806 | + _c2 = V_f[1] > U_f[1]; | ||
2807 | + V_f[1] -= _c1; | ||
2808 | + _c2 |= _c1 && (Z_f[1] == U_f[1]); | ||
2809 | + V_f[2] = U_f[2] - Z_f[2]; | ||
2810 | + _c3 = V_f[2] > U_f[2]; | ||
2811 | + V_f[2] -= _c2; | ||
2812 | + _c3 |= _c2 && (Z_f[2] == U_f[2]); | ||
2813 | + V_f[3] = U_f[3] - Z_f[3] - _c3; | ||
2814 | + } | ||
2815 | + while (0); | ||
2816 | + goto sub3; | ||
2817 | + } | ||
2818 | + if (U_e == 32767) | ||
2819 | + { | ||
2820 | + do | ||
2821 | + { | ||
2822 | + if (U_e == 32767 | ||
2823 | + && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) | ||
2824 | + == 0) | ||
2825 | + && !((U_f[3]) & | ||
2826 | + ((unsigned long) 1 << (113 - 2 + 3) | ||
2827 | + % 32))) | ||
2828 | + _fex |= (0); | ||
2829 | + } | ||
2830 | + while (0); | ||
2831 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
2832 | + U_f[2], V_f[3] = U_f[3]); | ||
2833 | + goto sub_done; | ||
2834 | + } | ||
2835 | + goto sub1; | ||
2836 | + } | ||
2837 | + } | ||
2838 | + else if (U_e == 32767) | ||
2839 | + { | ||
2840 | + do | ||
2841 | + { | ||
2842 | + if (U_e == 32767 | ||
2843 | + && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0) | ||
2844 | + && !((U_f[3]) & | ||
2845 | + ((unsigned long) 1 << (113 - 2 + 3) % 32))) | ||
2846 | + _fex |= (0); | ||
2847 | + } | ||
2848 | + while (0); | ||
2849 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
2850 | + U_f[2], V_f[3] = U_f[3]); | ||
2851 | + goto sub_done; | ||
2852 | + } | ||
2853 | + (Z_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32); | ||
2854 | + sub1:if (ediff <= (3 + 113)) | ||
2855 | + do | ||
2856 | + { | ||
2857 | + int _sticky; | ||
2858 | + do | ||
2859 | + { | ||
2860 | + long _up, _down, _skip, _i; | ||
2861 | + unsigned long _s; | ||
2862 | + _skip = (ediff) / 32; | ||
2863 | + _down = (ediff) % 32; | ||
2864 | + _up = 32 - _down; | ||
2865 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
2866 | + _s |= Z_f[_i]; | ||
2867 | + if (!_down) | ||
2868 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
2869 | + Z_f[_i] = Z_f[_i + _skip]; | ||
2870 | + else | ||
2871 | + { | ||
2872 | + _s |= Z_f[_i] << _up; | ||
2873 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
2874 | + Z_f[_i] = | ||
2875 | + Z_f[_i + _skip] >> _down | Z_f[_i + | ||
2876 | + _skip + | ||
2877 | + 1] << _up; | ||
2878 | + Z_f[_i++] = Z_f[3] >> _down; | ||
2879 | + } | ||
2880 | + for (; _i < 4; ++_i) | ||
2881 | + Z_f[_i] = 0; | ||
2882 | + _sticky = (_s != 0); | ||
2883 | + } | ||
2884 | + while (0); | ||
2885 | + Z_f[0] |= _sticky; | ||
2886 | + } | ||
2887 | + while (0); | ||
2888 | + else if (!((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
2889 | + (Z_f[3] = 0, Z_f[2] = 0, Z_f[1] = 0, Z_f[0] = 1); | ||
2890 | + do | ||
2891 | + { | ||
2892 | + unsigned long _c1, _c2, _c3; | ||
2893 | + V_f[0] = U_f[0] - Z_f[0]; | ||
2894 | + _c1 = V_f[0] > U_f[0]; | ||
2895 | + V_f[1] = U_f[1] - Z_f[1]; | ||
2896 | + _c2 = V_f[1] > U_f[1]; | ||
2897 | + V_f[1] -= _c1; | ||
2898 | + _c2 |= _c1 && (Z_f[1] == U_f[1]); | ||
2899 | + V_f[2] = U_f[2] - Z_f[2]; | ||
2900 | + _c3 = V_f[2] > U_f[2]; | ||
2901 | + V_f[2] -= _c2; | ||
2902 | + _c3 |= _c2 && (Z_f[2] == U_f[2]); | ||
2903 | + V_f[3] = U_f[3] - Z_f[3] - _c3; | ||
2904 | + } | ||
2905 | + while (0); | ||
2906 | + } | ||
2907 | + else if (ediff < 0) | ||
2908 | + { | ||
2909 | + ediff = -ediff; | ||
2910 | + V_e = Z_e; | ||
2911 | + V_s = Z_s; | ||
2912 | + if (U_e == 0) | ||
2913 | + { | ||
2914 | + if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)) | ||
2915 | + { | ||
2916 | + do | ||
2917 | + { | ||
2918 | + if (Z_e == 32767 | ||
2919 | + && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == | ||
2920 | + 0) | ||
2921 | + && !((Z_f[3]) & | ||
2922 | + ((unsigned long) 1 << (113 - 2 + 3) % | ||
2923 | + 32))) | ||
2924 | + _fex |= (0); | ||
2925 | + } | ||
2926 | + while (0); | ||
2927 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
2928 | + Z_f[2], V_f[3] = Z_f[3]); | ||
2929 | + goto sub_done; | ||
2930 | + } | ||
2931 | + else | ||
2932 | + { | ||
2933 | + _fex |= (0); | ||
2934 | + ediff--; | ||
2935 | + if (ediff == 0) | ||
2936 | + { | ||
2937 | + do | ||
2938 | + { | ||
2939 | + unsigned long _c1, _c2, _c3; | ||
2940 | + V_f[0] = Z_f[0] - U_f[0]; | ||
2941 | + _c1 = V_f[0] > Z_f[0]; | ||
2942 | + V_f[1] = Z_f[1] - U_f[1]; | ||
2943 | + _c2 = V_f[1] > Z_f[1]; | ||
2944 | + V_f[1] -= _c1; | ||
2945 | + _c2 |= _c1 && (U_f[1] == Z_f[1]); | ||
2946 | + V_f[2] = Z_f[2] - U_f[2]; | ||
2947 | + _c3 = V_f[2] > Z_f[2]; | ||
2948 | + V_f[2] -= _c2; | ||
2949 | + _c3 |= _c2 && (U_f[2] == Z_f[2]); | ||
2950 | + V_f[3] = Z_f[3] - U_f[3] - _c3; | ||
2951 | + } | ||
2952 | + while (0); | ||
2953 | + goto sub3; | ||
2954 | + } | ||
2955 | + if (Z_e == 32767) | ||
2956 | + { | ||
2957 | + do | ||
2958 | + { | ||
2959 | + if (Z_e == 32767 | ||
2960 | + && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) | ||
2961 | + == 0) | ||
2962 | + && !((Z_f[3]) & | ||
2963 | + ((unsigned long) 1 << (113 - 2 + 3) | ||
2964 | + % 32))) | ||
2965 | + _fex |= (0); | ||
2966 | + } | ||
2967 | + while (0); | ||
2968 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
2969 | + Z_f[2], V_f[3] = Z_f[3]); | ||
2970 | + goto sub_done; | ||
2971 | + } | ||
2972 | + goto sub2; | ||
2973 | + } | ||
2974 | + } | ||
2975 | + else if (Z_e == 32767) | ||
2976 | + { | ||
2977 | + do | ||
2978 | + { | ||
2979 | + if (Z_e == 32767 | ||
2980 | + && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0) | ||
2981 | + && !((Z_f[3]) & | ||
2982 | + ((unsigned long) 1 << (113 - 2 + 3) % 32))) | ||
2983 | + _fex |= (0); | ||
2984 | + } | ||
2985 | + while (0); | ||
2986 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
2987 | + Z_f[2], V_f[3] = Z_f[3]); | ||
2988 | + goto sub_done; | ||
2989 | + } | ||
2990 | + (U_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32); | ||
2991 | + sub2:if (ediff <= (3 + 113)) | ||
2992 | + do | ||
2993 | + { | ||
2994 | + int _sticky; | ||
2995 | + do | ||
2996 | + { | ||
2997 | + long _up, _down, _skip, _i; | ||
2998 | + unsigned long _s; | ||
2999 | + _skip = (ediff) / 32; | ||
3000 | + _down = (ediff) % 32; | ||
3001 | + _up = 32 - _down; | ||
3002 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
3003 | + _s |= U_f[_i]; | ||
3004 | + if (!_down) | ||
3005 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
3006 | + U_f[_i] = U_f[_i + _skip]; | ||
3007 | + else | ||
3008 | + { | ||
3009 | + _s |= U_f[_i] << _up; | ||
3010 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
3011 | + U_f[_i] = | ||
3012 | + U_f[_i + _skip] >> _down | U_f[_i + | ||
3013 | + _skip + | ||
3014 | + 1] << _up; | ||
3015 | + U_f[_i++] = U_f[3] >> _down; | ||
3016 | + } | ||
3017 | + for (; _i < 4; ++_i) | ||
3018 | + U_f[_i] = 0; | ||
3019 | + _sticky = (_s != 0); | ||
3020 | + } | ||
3021 | + while (0); | ||
3022 | + U_f[0] |= _sticky; | ||
3023 | + } | ||
3024 | + while (0); | ||
3025 | + else if (!((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)) | ||
3026 | + (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 1); | ||
3027 | + do | ||
3028 | + { | ||
3029 | + unsigned long _c1, _c2, _c3; | ||
3030 | + V_f[0] = Z_f[0] - U_f[0]; | ||
3031 | + _c1 = V_f[0] > Z_f[0]; | ||
3032 | + V_f[1] = Z_f[1] - U_f[1]; | ||
3033 | + _c2 = V_f[1] > Z_f[1]; | ||
3034 | + V_f[1] -= _c1; | ||
3035 | + _c2 |= _c1 && (U_f[1] == Z_f[1]); | ||
3036 | + V_f[2] = Z_f[2] - U_f[2]; | ||
3037 | + _c3 = V_f[2] > Z_f[2]; | ||
3038 | + V_f[2] -= _c2; | ||
3039 | + _c3 |= _c2 && (U_f[2] == Z_f[2]); | ||
3040 | + V_f[3] = Z_f[3] - U_f[3] - _c3; | ||
3041 | + } | ||
3042 | + while (0); | ||
3043 | + } | ||
3044 | + else | ||
3045 | + { | ||
3046 | + if (!(((U_e + 1) & 32767) > 1)) | ||
3047 | + { | ||
3048 | + if (U_e == 0) | ||
3049 | + { | ||
3050 | + V_e = 0; | ||
3051 | + if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)) | ||
3052 | + { | ||
3053 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
3054 | + Z_f[2], V_f[3] = Z_f[3]); | ||
3055 | + if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
3056 | + V_s = (0 == 3); | ||
3057 | + else | ||
3058 | + { | ||
3059 | + _fex |= (0); | ||
3060 | + V_s = Z_s; | ||
3061 | + } | ||
3062 | + goto sub_done; | ||
3063 | + } | ||
3064 | + else if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
3065 | + { | ||
3066 | + _fex |= (0); | ||
3067 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
3068 | + U_f[2], V_f[3] = U_f[3]); | ||
3069 | + V_s = U_s; | ||
3070 | + goto sub_done; | ||
3071 | + } | ||
3072 | + else | ||
3073 | + { | ||
3074 | + _fex |= (0); | ||
3075 | + do | ||
3076 | + { | ||
3077 | + unsigned long _c1, _c2, _c3; | ||
3078 | + V_f[0] = U_f[0] - Z_f[0]; | ||
3079 | + _c1 = V_f[0] > U_f[0]; | ||
3080 | + V_f[1] = U_f[1] - Z_f[1]; | ||
3081 | + _c2 = V_f[1] > U_f[1]; | ||
3082 | + V_f[1] -= _c1; | ||
3083 | + _c2 |= _c1 && (Z_f[1] == U_f[1]); | ||
3084 | + V_f[2] = U_f[2] - Z_f[2]; | ||
3085 | + _c3 = V_f[2] > U_f[2]; | ||
3086 | + V_f[2] -= _c2; | ||
3087 | + _c3 |= _c2 && (Z_f[2] == U_f[2]); | ||
3088 | + V_f[3] = U_f[3] - Z_f[3] - _c3; | ||
3089 | + } | ||
3090 | + while (0); | ||
3091 | + V_s = U_s; | ||
3092 | + if ((V_f[3]) & | ||
3093 | + ((unsigned long) 1 << (113 - 1 + 3) % 32)) | ||
3094 | + { | ||
3095 | + do | ||
3096 | + { | ||
3097 | + unsigned long _c1, _c2, _c3; | ||
3098 | + V_f[0] = Z_f[0] - U_f[0]; | ||
3099 | + _c1 = V_f[0] > Z_f[0]; | ||
3100 | + V_f[1] = Z_f[1] - U_f[1]; | ||
3101 | + _c2 = V_f[1] > Z_f[1]; | ||
3102 | + V_f[1] -= _c1; | ||
3103 | + _c2 |= _c1 && (U_f[1] == Z_f[1]); | ||
3104 | + V_f[2] = Z_f[2] - U_f[2]; | ||
3105 | + _c3 = V_f[2] > Z_f[2]; | ||
3106 | + V_f[2] -= _c2; | ||
3107 | + _c3 |= _c2 && (U_f[2] == Z_f[2]); | ||
3108 | + V_f[3] = Z_f[3] - U_f[3] - _c3; | ||
3109 | + } | ||
3110 | + while (0); | ||
3111 | + V_s = Z_s; | ||
3112 | + } | ||
3113 | + else | ||
3114 | + if (((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == | ||
3115 | + 0)) | ||
3116 | + V_s = (0 == 3); | ||
3117 | + goto sub_done; | ||
3118 | + } | ||
3119 | + } | ||
3120 | + else | ||
3121 | + { | ||
3122 | + do | ||
3123 | + { | ||
3124 | + if (U_e == 32767 | ||
3125 | + && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == | ||
3126 | + 0) | ||
3127 | + && !((U_f[3]) & | ||
3128 | + ((unsigned long) 1 << (113 - 2 + 3) % | ||
3129 | + 32))) | ||
3130 | + _fex |= (0); | ||
3131 | + } | ||
3132 | + while (0); | ||
3133 | + do | ||
3134 | + { | ||
3135 | + if (Z_e == 32767 | ||
3136 | + && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == | ||
3137 | + 0) | ||
3138 | + && !((Z_f[3]) & | ||
3139 | + ((unsigned long) 1 << (113 - 2 + 3) % | ||
3140 | + 32))) | ||
3141 | + _fex |= (0); | ||
3142 | + } | ||
3143 | + while (0); | ||
3144 | + V_e = 32767; | ||
3145 | + if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)) | ||
3146 | + { | ||
3147 | + if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
3148 | + { | ||
3149 | + V_s = 0; | ||
3150 | + (V_f[3] = | ||
3151 | + ((((unsigned long) 1 << (113 - 2) % | ||
3152 | + 32) << 1) - 1), V_f[2] = -1, V_f[1] = | ||
3153 | + -1, V_f[0] = -1); | ||
3154 | + do | ||
3155 | + { | ||
3156 | + long _up, _down, _skip, _i; | ||
3157 | + _skip = (3) / 32; | ||
3158 | + _up = (3) % 32; | ||
3159 | + _down = 32 - _up; | ||
3160 | + if (!_up) | ||
3161 | + for (_i = 3; _i >= _skip; --_i) | ||
3162 | + V_f[_i] = V_f[_i - _skip]; | ||
3163 | + else | ||
3164 | + { | ||
3165 | + for (_i = 3; _i > _skip; --_i) | ||
3166 | + V_f[_i] = | ||
3167 | + V_f[_i - | ||
3168 | + _skip] << _up | V_f[_i - | ||
3169 | + _skip - | ||
3170 | + 1] >> | ||
3171 | + _down; | ||
3172 | + V_f[_i--] = V_f[0] << _up; | ||
3173 | + } | ||
3174 | + for (; _i >= 0; --_i) | ||
3175 | + V_f[_i] = 0; | ||
3176 | + } | ||
3177 | + while (0); | ||
3178 | + _fex |= (0); | ||
3179 | + } | ||
3180 | + else | ||
3181 | + { | ||
3182 | + V_s = Z_s; | ||
3183 | + (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] = | ||
3184 | + Z_f[2], V_f[3] = Z_f[3]); | ||
3185 | + } | ||
3186 | + } | ||
3187 | + else | ||
3188 | + { | ||
3189 | + if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)) | ||
3190 | + { | ||
3191 | + V_s = U_s; | ||
3192 | + (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] = | ||
3193 | + U_f[2], V_f[3] = U_f[3]); | ||
3194 | + } | ||
3195 | + else | ||
3196 | + { | ||
3197 | + do | ||
3198 | + { | ||
3199 | + do | ||
3200 | + { | ||
3201 | + long _up, _down, _skip, _i; | ||
3202 | + _skip = (3) / 32; | ||
3203 | + _down = (3) % 32; | ||
3204 | + _up = 32 - _down; | ||
3205 | + if (!_down) | ||
3206 | + for (_i = 0; _i <= 3 - _skip; | ||
3207 | + ++_i) | ||
3208 | + U_f[_i] = U_f[_i + _skip]; | ||
3209 | + else | ||
3210 | + { | ||
3211 | + for (_i = 0; _i < 3 - _skip; | ||
3212 | + ++_i) | ||
3213 | + U_f[_i] = | ||
3214 | + U_f[_i + | ||
3215 | + _skip] >> _down | U_f[_i | ||
3216 | + + | ||
3217 | + _skip | ||
3218 | + + | ||
3219 | + 1] | ||
3220 | + << _up; | ||
3221 | + U_f[_i++] = U_f[3] >> _down; | ||
3222 | + } | ||
3223 | + for (; _i < 4; ++_i) | ||
3224 | + U_f[_i] = 0; | ||
3225 | + } | ||
3226 | + while (0); | ||
3227 | + do | ||
3228 | + { | ||
3229 | + long _up, _down, _skip, _i; | ||
3230 | + _skip = (3) / 32; | ||
3231 | + _down = (3) % 32; | ||
3232 | + _up = 32 - _down; | ||
3233 | + if (!_down) | ||
3234 | + for (_i = 0; _i <= 3 - _skip; | ||
3235 | + ++_i) | ||
3236 | + Z_f[_i] = Z_f[_i + _skip]; | ||
3237 | + else | ||
3238 | + { | ||
3239 | + for (_i = 0; _i < 3 - _skip; | ||
3240 | + ++_i) | ||
3241 | + Z_f[_i] = | ||
3242 | + Z_f[_i + | ||
3243 | + _skip] >> _down | Z_f[_i | ||
3244 | + + | ||
3245 | + _skip | ||
3246 | + + | ||
3247 | + 1] | ||
3248 | + << _up; | ||
3249 | + Z_f[_i++] = Z_f[3] >> _down; | ||
3250 | + } | ||
3251 | + for (; _i < 4; ++_i) | ||
3252 | + Z_f[_i] = 0; | ||
3253 | + } | ||
3254 | + while (0); | ||
3255 | + do | ||
3256 | + { | ||
3257 | + if (((U_f[3]) & | ||
3258 | + ((unsigned long) 1 << (113 - 2) | ||
3259 | + % 32)) | ||
3260 | + && !((Z_f[3]) & | ||
3261 | + ((unsigned long) 1 << | ||
3262 | + (113 - 2) % 32))) | ||
3263 | + { | ||
3264 | + V_s = Z_s; | ||
3265 | + (V_f[0] = Z_f[0], V_f[1] = | ||
3266 | + Z_f[1], V_f[2] = | ||
3267 | + Z_f[2], V_f[3] = Z_f[3]); | ||
3268 | + } | ||
3269 | + else | ||
3270 | + { | ||
3271 | + V_s = U_s; | ||
3272 | + (V_f[0] = U_f[0], V_f[1] = | ||
3273 | + U_f[1], V_f[2] = | ||
3274 | + U_f[2], V_f[3] = U_f[3]); | ||
3275 | + } | ||
3276 | + V_c = 3; | ||
3277 | + } | ||
3278 | + while (0); | ||
3279 | + do | ||
3280 | + { | ||
3281 | + long _up, _down, _skip, _i; | ||
3282 | + _skip = (3) / 32; | ||
3283 | + _up = (3) % 32; | ||
3284 | + _down = 32 - _up; | ||
3285 | + if (!_up) | ||
3286 | + for (_i = 3; _i >= _skip; --_i) | ||
3287 | + V_f[_i] = V_f[_i - _skip]; | ||
3288 | + else | ||
3289 | + { | ||
3290 | + for (_i = 3; _i > _skip; --_i) | ||
3291 | + V_f[_i] = | ||
3292 | + V_f[_i - | ||
3293 | + _skip] << _up | V_f[_i - | ||
3294 | + _skip | ||
3295 | + - | ||
3296 | + 1] | ||
3297 | + >> _down; | ||
3298 | + V_f[_i--] = V_f[0] << _up; | ||
3299 | + } | ||
3300 | + for (; _i >= 0; --_i) | ||
3301 | + V_f[_i] = 0; | ||
3302 | + } | ||
3303 | + while (0); | ||
3304 | + } | ||
3305 | + while (0); | ||
3306 | + } | ||
3307 | + } | ||
3308 | + goto sub_done; | ||
3309 | + } | ||
3310 | + } | ||
3311 | + V_e = U_e; | ||
3312 | + do | ||
3313 | + { | ||
3314 | + unsigned long _c1, _c2, _c3; | ||
3315 | + V_f[0] = U_f[0] - Z_f[0]; | ||
3316 | + _c1 = V_f[0] > U_f[0]; | ||
3317 | + V_f[1] = U_f[1] - Z_f[1]; | ||
3318 | + _c2 = V_f[1] > U_f[1]; | ||
3319 | + V_f[1] -= _c1; | ||
3320 | + _c2 |= _c1 && (Z_f[1] == U_f[1]); | ||
3321 | + V_f[2] = U_f[2] - Z_f[2]; | ||
3322 | + _c3 = V_f[2] > U_f[2]; | ||
3323 | + V_f[2] -= _c2; | ||
3324 | + _c3 |= _c2 && (Z_f[2] == U_f[2]); | ||
3325 | + V_f[3] = U_f[3] - Z_f[3] - _c3; | ||
3326 | + } | ||
3327 | + while (0); | ||
3328 | + V_s = U_s; | ||
3329 | + if ((V_f[3]) & ((unsigned long) 1 << (113 - 1 + 3) % 32)) | ||
3330 | + { | ||
3331 | + do | ||
3332 | + { | ||
3333 | + unsigned long _c1, _c2, _c3; | ||
3334 | + V_f[0] = Z_f[0] - U_f[0]; | ||
3335 | + _c1 = V_f[0] > Z_f[0]; | ||
3336 | + V_f[1] = Z_f[1] - U_f[1]; | ||
3337 | + _c2 = V_f[1] > Z_f[1]; | ||
3338 | + V_f[1] -= _c1; | ||
3339 | + _c2 |= _c1 && (U_f[1] == Z_f[1]); | ||
3340 | + V_f[2] = Z_f[2] - U_f[2]; | ||
3341 | + _c3 = V_f[2] > Z_f[2]; | ||
3342 | + V_f[2] -= _c2; | ||
3343 | + _c3 |= _c2 && (U_f[2] == Z_f[2]); | ||
3344 | + V_f[3] = Z_f[3] - U_f[3] - _c3; | ||
3345 | + } | ||
3346 | + while (0); | ||
3347 | + V_s = Z_s; | ||
3348 | + } | ||
3349 | + else if (((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0)) | ||
3350 | + { | ||
3351 | + V_e = 0; | ||
3352 | + V_s = (0 == 3); | ||
3353 | + goto sub_done; | ||
3354 | + } | ||
3355 | + goto norm; | ||
3356 | + } | ||
3357 | + sub3:if ((V_f[3]) & | ||
3358 | + ((unsigned long) 1 << (113 - 1 + 3) % 32)) | ||
3359 | + { | ||
3360 | + int diff; | ||
3361 | + (V_f[3]) &= ((unsigned long) 1 << (113 - 1 + 3) % 32) - 1; | ||
3362 | + norm:do | ||
3363 | + { | ||
3364 | + if (V_f[3]) | ||
3365 | + { | ||
3366 | + do | ||
3367 | + { | ||
3368 | + if (sizeof (unsigned long) == | ||
3369 | + sizeof (unsigned int)) | ||
3370 | + diff = __builtin_clz (V_f[3]); | ||
3371 | + else if (sizeof (unsigned long) == | ||
3372 | + sizeof (unsigned long)) | ||
3373 | + diff = __builtin_clzl (V_f[3]); | ||
3374 | + else if (sizeof (unsigned long) == | ||
3375 | + sizeof (unsigned long long)) | ||
3376 | + diff = __builtin_clzll (V_f[3]); | ||
3377 | + else | ||
3378 | + abort (); | ||
3379 | + } | ||
3380 | + while (0); | ||
3381 | + } | ||
3382 | + else if (V_f[2]) | ||
3383 | + { | ||
3384 | + do | ||
3385 | + { | ||
3386 | + if (sizeof (unsigned long) == | ||
3387 | + sizeof (unsigned int)) | ||
3388 | + diff = __builtin_clz (V_f[2]); | ||
3389 | + else if (sizeof (unsigned long) == | ||
3390 | + sizeof (unsigned long)) | ||
3391 | + diff = __builtin_clzl (V_f[2]); | ||
3392 | + else if (sizeof (unsigned long) == | ||
3393 | + sizeof (unsigned long long)) | ||
3394 | + diff = __builtin_clzll (V_f[2]); | ||
3395 | + else | ||
3396 | + abort (); | ||
3397 | + } | ||
3398 | + while (0); | ||
3399 | + diff += 32; | ||
3400 | + } | ||
3401 | + else if (V_f[1]) | ||
3402 | + { | ||
3403 | + do | ||
3404 | + { | ||
3405 | + if (sizeof (unsigned long) == | ||
3406 | + sizeof (unsigned int)) | ||
3407 | + diff = __builtin_clz (V_f[1]); | ||
3408 | + else if (sizeof (unsigned long) == | ||
3409 | + sizeof (unsigned long)) | ||
3410 | + diff = __builtin_clzl (V_f[1]); | ||
3411 | + else if (sizeof (unsigned long) == | ||
3412 | + sizeof (unsigned long long)) | ||
3413 | + diff = __builtin_clzll (V_f[1]); | ||
3414 | + else | ||
3415 | + abort (); | ||
3416 | + } | ||
3417 | + while (0); | ||
3418 | + diff += 32 * 2; | ||
3419 | + } | ||
3420 | + else | ||
3421 | + { | ||
3422 | + do | ||
3423 | + { | ||
3424 | + if (sizeof (unsigned long) == | ||
3425 | + sizeof (unsigned int)) | ||
3426 | + diff = __builtin_clz (V_f[0]); | ||
3427 | + else if (sizeof (unsigned long) == | ||
3428 | + sizeof (unsigned long)) | ||
3429 | + diff = __builtin_clzl (V_f[0]); | ||
3430 | + else if (sizeof (unsigned long) == | ||
3431 | + sizeof (unsigned long long)) | ||
3432 | + diff = __builtin_clzll (V_f[0]); | ||
3433 | + else | ||
3434 | + abort (); | ||
3435 | + } | ||
3436 | + while (0); | ||
3437 | + diff += 32 * 3; | ||
3438 | + } | ||
3439 | + } | ||
3440 | + while (0); | ||
3441 | + diff -= ((4 * 32) - (3 + 113)); | ||
3442 | + do | ||
3443 | + { | ||
3444 | + long _up, _down, _skip, _i; | ||
3445 | + _skip = (diff) / 32; | ||
3446 | + _up = (diff) % 32; | ||
3447 | + _down = 32 - _up; | ||
3448 | + if (!_up) | ||
3449 | + for (_i = 3; _i >= _skip; --_i) | ||
3450 | + V_f[_i] = V_f[_i - _skip]; | ||
3451 | + else | ||
3452 | + { | ||
3453 | + for (_i = 3; _i > _skip; --_i) | ||
3454 | + V_f[_i] = | ||
3455 | + V_f[_i - _skip] << _up | V_f[_i - _skip - | ||
3456 | + 1] >> _down; | ||
3457 | + V_f[_i--] = V_f[0] << _up; | ||
3458 | + } | ||
3459 | + for (; _i >= 0; --_i) | ||
3460 | + V_f[_i] = 0; | ||
3461 | + } | ||
3462 | + while (0); | ||
3463 | + if (V_e <= diff) | ||
3464 | + { | ||
3465 | + diff = diff - V_e + 1; | ||
3466 | + do | ||
3467 | + { | ||
3468 | + int _sticky; | ||
3469 | + do | ||
3470 | + { | ||
3471 | + long _up, _down, _skip, _i; | ||
3472 | + unsigned long _s; | ||
3473 | + _skip = (diff) / 32; | ||
3474 | + _down = (diff) % 32; | ||
3475 | + _up = 32 - _down; | ||
3476 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
3477 | + _s |= V_f[_i]; | ||
3478 | + if (!_down) | ||
3479 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
3480 | + V_f[_i] = V_f[_i + _skip]; | ||
3481 | + else | ||
3482 | + { | ||
3483 | + _s |= V_f[_i] << _up; | ||
3484 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
3485 | + V_f[_i] = | ||
3486 | + V_f[_i + _skip] >> _down | V_f[_i + | ||
3487 | + _skip + | ||
3488 | + 1] << | ||
3489 | + _up; | ||
3490 | + V_f[_i++] = V_f[3] >> _down; | ||
3491 | + } | ||
3492 | + for (; _i < 4; ++_i) | ||
3493 | + V_f[_i] = 0; | ||
3494 | + _sticky = (_s != 0); | ||
3495 | + } | ||
3496 | + while (0); | ||
3497 | + V_f[0] |= _sticky; | ||
3498 | + } | ||
3499 | + while (0); | ||
3500 | + V_e = 0; | ||
3501 | + } | ||
3502 | + else | ||
3503 | + { | ||
3504 | + V_e -= diff; | ||
3505 | + (V_f[3]) &= | ||
3506 | + ~(unsigned long) ((unsigned long) 1 << (113 - 1 + 3) % | ||
3507 | + 32); | ||
3508 | + } | ||
3509 | + } | ||
3510 | + sub_done:; | ||
3511 | + } | ||
3512 | + } | ||
3513 | + while (0); | ||
3514 | + } | ||
3515 | + while (0); | ||
3516 | + | ||
3517 | +/* FP_PACK_SEMIRAW_Q(v,V) */ | ||
3518 | + do | ||
3519 | + { | ||
3520 | + do | ||
3521 | + { | ||
3522 | + do | ||
3523 | + { | ||
3524 | + if ((V_f[0]) & 7) | ||
3525 | + _fex |= (0); | ||
3526 | + switch (0) | ||
3527 | + { | ||
3528 | + case 0: | ||
3529 | + do | ||
3530 | + { | ||
3531 | + if (((V_f[0]) & 15) != ((unsigned long) 1 << 2)) | ||
3532 | + do | ||
3533 | + { | ||
3534 | + unsigned long _t; | ||
3535 | + _t = | ||
3536 | + ((V_f[0] += | ||
3537 | + ((unsigned long) 1 << 2)) < | ||
3538 | + ((unsigned long) 1 << 2)); | ||
3539 | + V_f[1] += _t; | ||
3540 | + _t = (V_f[1] < _t); | ||
3541 | + V_f[2] += _t; | ||
3542 | + _t = (V_f[2] < _t); | ||
3543 | + V_f[3] += _t; | ||
3544 | + } | ||
3545 | + while (0); | ||
3546 | + } | ||
3547 | + while (0); | ||
3548 | + break; | ||
3549 | + case 1: | ||
3550 | + (void) 0; | ||
3551 | + break; | ||
3552 | + case 2: | ||
3553 | + do | ||
3554 | + { | ||
3555 | + if (!V_s && ((V_f[0]) & 7)) | ||
3556 | + do | ||
3557 | + { | ||
3558 | + unsigned long _t; | ||
3559 | + _t = | ||
3560 | + ((V_f[0] += | ||
3561 | + ((unsigned long) 1 << 3)) < | ||
3562 | + ((unsigned long) 1 << 3)); | ||
3563 | + V_f[1] += _t; | ||
3564 | + _t = (V_f[1] < _t); | ||
3565 | + V_f[2] += _t; | ||
3566 | + _t = (V_f[2] < _t); | ||
3567 | + V_f[3] += _t; | ||
3568 | + } | ||
3569 | + while (0); | ||
3570 | + } | ||
3571 | + while (0); | ||
3572 | + break; | ||
3573 | + case 3: | ||
3574 | + do | ||
3575 | + { | ||
3576 | + if (V_s && ((V_f[0]) & 7)) | ||
3577 | + do | ||
3578 | + { | ||
3579 | + unsigned long _t; | ||
3580 | + _t = | ||
3581 | + ((V_f[0] += | ||
3582 | + ((unsigned long) 1 << 3)) < | ||
3583 | + ((unsigned long) 1 << 3)); | ||
3584 | + V_f[1] += _t; | ||
3585 | + _t = (V_f[1] < _t); | ||
3586 | + V_f[2] += _t; | ||
3587 | + _t = (V_f[2] < _t); | ||
3588 | + V_f[3] += _t; | ||
3589 | + } | ||
3590 | + while (0); | ||
3591 | + } | ||
3592 | + while (0); | ||
3593 | + break; | ||
3594 | + } | ||
3595 | + } | ||
3596 | + while (0); | ||
3597 | + if ((V_f[3]) & (((unsigned long) 1 << ((3 + 113) % 32)) >> 1)) | ||
3598 | + { | ||
3599 | + (V_f[3]) &= ~(((unsigned long) 1 << ((3 + 113) % 32)) >> 1); | ||
3600 | + V_e++; | ||
3601 | + if (V_e == 32767) | ||
3602 | + do | ||
3603 | + { | ||
3604 | + if (0 == 0 || (0 == 2 && !V_s) || (0 == 3 && V_s)) | ||
3605 | + { | ||
3606 | + V_e = 32767; | ||
3607 | + (V_f[3] = 0, V_f[2] = 0, V_f[1] = 0, V_f[0] = 0); | ||
3608 | + } | ||
3609 | + else | ||
3610 | + { | ||
3611 | + V_e = 32767 - 1; | ||
3612 | + _fex |= (0); | ||
3613 | + _fex |= (0); | ||
3614 | + (V_f[3] = (~(signed long) 0), V_f[2] = | ||
3615 | + (~(signed long) 0), V_f[1] = | ||
3616 | + (~(signed long) 0), V_f[0] = (~(signed long) 0)); | ||
3617 | + } | ||
3618 | + } | ||
3619 | + while (0); | ||
3620 | + } | ||
3621 | + do | ||
3622 | + { | ||
3623 | + long _up, _down, _skip, _i; | ||
3624 | + _skip = (3) / 32; | ||
3625 | + _down = (3) % 32; | ||
3626 | + _up = 32 - _down; | ||
3627 | + if (!_down) | ||
3628 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
3629 | + V_f[_i] = V_f[_i + _skip]; | ||
3630 | + else | ||
3631 | + { | ||
3632 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
3633 | + V_f[_i] = | ||
3634 | + V_f[_i + _skip] >> _down | V_f[_i + _skip + 1] << _up; | ||
3635 | + V_f[_i++] = V_f[3] >> _down; | ||
3636 | + } | ||
3637 | + for (; _i < 4; ++_i) | ||
3638 | + V_f[_i] = 0; | ||
3639 | + } | ||
3640 | + while (0); | ||
3641 | + if (!(((V_e + 1) & 32767) > 1) | ||
3642 | + && !((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0)) | ||
3643 | + { | ||
3644 | + if (V_e == 0) | ||
3645 | + _fex |= (0); | ||
3646 | + else | ||
3647 | + { | ||
3648 | + if (!1) | ||
3649 | + { | ||
3650 | + (V_f[3] = | ||
3651 | + ((((unsigned long) 1 << (113 - 2) % 32) << 1) - 1), | ||
3652 | + V_f[2] = -1, V_f[1] = -1, V_f[0] = -1); | ||
3653 | + V_s = 0; | ||
3654 | + } | ||
3655 | + else | ||
3656 | + (V_f[3]) |= ((unsigned long) 1 << (113 - 2) % 32); | ||
3657 | + } | ||
3658 | + } | ||
3659 | + } | ||
3660 | + while (0); | ||
3661 | + do | ||
3662 | + { | ||
3663 | + union _FP_UNION_Q _flo; | ||
3664 | + _flo.bits.frac0 = V_f[0]; | ||
3665 | + _flo.bits.frac1 = V_f[1]; | ||
3666 | + _flo.bits.frac2 = V_f[2]; | ||
3667 | + _flo.bits.frac3 = V_f[3]; | ||
3668 | + _flo.bits.exp = V_e; | ||
3669 | + _flo.bits.sign = V_s; | ||
3670 | + (v) = _flo.flt; | ||
3671 | + } | ||
3672 | + while (0); | ||
3673 | + } | ||
3674 | + while (0); | ||
3675 | + | ||
3676 | +/* FP_HANDLE_EXCEPTIONS */ | ||
3677 | + do | ||
3678 | + { | ||
3679 | + } | ||
3680 | + while (0); | ||
3681 | + | ||
3682 | + /* Truncate quad to double. */ | ||
3683 | +/* FP_INIT_ROUNDMODE */ | ||
3684 | + do | ||
3685 | + { | ||
3686 | + } | ||
3687 | + while (0); | ||
3688 | + | ||
3689 | +/* FP_UNPACK_SEMIRAW_Q(V,v) */ | ||
3690 | + do | ||
3691 | + { | ||
3692 | + do | ||
3693 | + { | ||
3694 | + union _FP_UNION_Q _flo; | ||
3695 | + _flo.flt = (v); | ||
3696 | + V_f[0] = _flo.bits.frac0; | ||
3697 | + V_f[1] = _flo.bits.frac1; | ||
3698 | + V_f[2] = _flo.bits.frac2; | ||
3699 | + V_f[3] = _flo.bits.frac3; | ||
3700 | + V_e = _flo.bits.exp; | ||
3701 | + V_s = _flo.bits.sign; | ||
3702 | + } | ||
3703 | + while (0); | ||
3704 | + do | ||
3705 | + { | ||
3706 | + long _up, _down, _skip, _i; | ||
3707 | + _skip = (3) / 32; | ||
3708 | + _up = (3) % 32; | ||
3709 | + _down = 32 - _up; | ||
3710 | + if (!_up) | ||
3711 | + for (_i = 3; _i >= _skip; --_i) | ||
3712 | + V_f[_i] = V_f[_i - _skip]; | ||
3713 | + else | ||
3714 | + { | ||
3715 | + for (_i = 3; _i > _skip; --_i) | ||
3716 | + V_f[_i] = | ||
3717 | + V_f[_i - _skip] << _up | V_f[_i - _skip - 1] >> _down; | ||
3718 | + V_f[_i--] = V_f[0] << _up; | ||
3719 | + } | ||
3720 | + for (; _i >= 0; --_i) | ||
3721 | + V_f[_i] = 0; | ||
3722 | + } | ||
3723 | + while (0); | ||
3724 | + } | ||
3725 | + while (0); | ||
3726 | + | ||
3727 | +/* FP_TRUNC(D,Q,2,4,R,V) */ | ||
3728 | + do | ||
3729 | + { | ||
3730 | + if (113 < 53 || 16383 < 1023 + 53 - 1) | ||
3731 | + abort (); | ||
3732 | + R_s = V_s; | ||
3733 | + if ((((V_e + 1) & 32767) > 1)) | ||
3734 | + { | ||
3735 | + R_e = V_e + 1023 - 16383; | ||
3736 | + if (R_e >= 2047) | ||
3737 | + do | ||
3738 | + { | ||
3739 | + if (0 == 0 || (0 == 2 && !R_s) || (0 == 3 && R_s)) | ||
3740 | + { | ||
3741 | + R_e = 2047; | ||
3742 | + (R_f0 = 0, R_f1 = 0); | ||
3743 | + } | ||
3744 | + else | ||
3745 | + { | ||
3746 | + R_e = 2047 - 1; | ||
3747 | + _fex |= (0); | ||
3748 | + _fex |= (0); | ||
3749 | + (R_f0 = (~(signed long) 0), R_f1 = (~(signed long) 0)); | ||
3750 | + } | ||
3751 | + } | ||
3752 | + while (0); | ||
3753 | + else | ||
3754 | + { | ||
3755 | + if (R_e <= 0) | ||
3756 | + { | ||
3757 | + if (R_e <= 1 - 53) | ||
3758 | + (V_f[3] = 0, V_f[2] = 0, V_f[1] = 0, V_f[0] = 0); | ||
3759 | + else | ||
3760 | + { | ||
3761 | + (V_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32); | ||
3762 | + do | ||
3763 | + { | ||
3764 | + int _sticky; | ||
3765 | + do | ||
3766 | + { | ||
3767 | + long _up, _down, _skip, _i; | ||
3768 | + unsigned long _s; | ||
3769 | + _skip = (((3 + 113) - (3 + 53) + 1 - R_e)) / 32; | ||
3770 | + _down = (((3 + 113) - (3 + 53) + 1 - R_e)) % 32; | ||
3771 | + _up = 32 - _down; | ||
3772 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
3773 | + _s |= V_f[_i]; | ||
3774 | + if (!_down) | ||
3775 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
3776 | + V_f[_i] = V_f[_i + _skip]; | ||
3777 | + else | ||
3778 | + { | ||
3779 | + _s |= V_f[_i] << _up; | ||
3780 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
3781 | + V_f[_i] = | ||
3782 | + V_f[_i + _skip] >> _down | V_f[_i + | ||
3783 | + _skip + | ||
3784 | + 1] << | ||
3785 | + _up; | ||
3786 | + V_f[_i++] = V_f[3] >> _down; | ||
3787 | + } | ||
3788 | + for (; _i < 4; ++_i) | ||
3789 | + V_f[_i] = 0; | ||
3790 | + _sticky = (_s != 0); | ||
3791 | + } | ||
3792 | + while (0); | ||
3793 | + V_f[0] |= _sticky; | ||
3794 | + } | ||
3795 | + while (0); | ||
3796 | + } | ||
3797 | + R_e = 0; | ||
3798 | + } | ||
3799 | + else | ||
3800 | + do | ||
3801 | + { | ||
3802 | + int _sticky; | ||
3803 | + do | ||
3804 | + { | ||
3805 | + long _up, _down, _skip, _i; | ||
3806 | + unsigned long _s; | ||
3807 | + _skip = (((3 + 113) - (3 + 53))) / 32; | ||
3808 | + _down = (((3 + 113) - (3 + 53))) % 32; | ||
3809 | + _up = 32 - _down; | ||
3810 | + for (_s = _i = 0; _i < _skip; ++_i) | ||
3811 | + _s |= V_f[_i]; | ||
3812 | + if (!_down) | ||
3813 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
3814 | + V_f[_i] = V_f[_i + _skip]; | ||
3815 | + else | ||
3816 | + { | ||
3817 | + _s |= V_f[_i] << _up; | ||
3818 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
3819 | + V_f[_i] = | ||
3820 | + V_f[_i + _skip] >> _down | V_f[_i + _skip + | ||
3821 | + 1] << _up; | ||
3822 | + V_f[_i++] = V_f[3] >> _down; | ||
3823 | + } | ||
3824 | + for (; _i < 4; ++_i) | ||
3825 | + V_f[_i] = 0; | ||
3826 | + _sticky = (_s != 0); | ||
3827 | + } | ||
3828 | + while (0); | ||
3829 | + V_f[0] |= _sticky; | ||
3830 | + } | ||
3831 | + while (0); | ||
3832 | + do | ||
3833 | + { | ||
3834 | + R_f0 = V_f[0]; | ||
3835 | + R_f1 = V_f[1]; | ||
3836 | + } | ||
3837 | + while (0); | ||
3838 | + } | ||
3839 | + } | ||
3840 | + else | ||
3841 | + { | ||
3842 | + if (V_e == 0) | ||
3843 | + { | ||
3844 | + R_e = 0; | ||
3845 | + (R_f0 = 0, R_f1 = 0); | ||
3846 | + if (!((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0)) | ||
3847 | + { | ||
3848 | + _fex |= (0); | ||
3849 | + _fex |= (0); | ||
3850 | + } | ||
3851 | + } | ||
3852 | + else | ||
3853 | + { | ||
3854 | + R_e = 2047; | ||
3855 | + if (((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0)) | ||
3856 | + (R_f0 = 0, R_f1 = 0); | ||
3857 | + else | ||
3858 | + { | ||
3859 | + do | ||
3860 | + { | ||
3861 | + if (V_e == 32767 | ||
3862 | + && !((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0) | ||
3863 | + && !((V_f[3]) & | ||
3864 | + ((unsigned long) 1 << (113 - 2 + 3) % 32))) | ||
3865 | + _fex |= (0); | ||
3866 | + } | ||
3867 | + while (0); | ||
3868 | + do | ||
3869 | + { | ||
3870 | + long _up, _down, _skip, _i; | ||
3871 | + _skip = (((3 + 113) - (3 + 53))) / 32; | ||
3872 | + _down = (((3 + 113) - (3 + 53))) % 32; | ||
3873 | + _up = 32 - _down; | ||
3874 | + if (!_down) | ||
3875 | + for (_i = 0; _i <= 3 - _skip; ++_i) | ||
3876 | + V_f[_i] = V_f[_i + _skip]; | ||
3877 | + else | ||
3878 | + { | ||
3879 | + for (_i = 0; _i < 3 - _skip; ++_i) | ||
3880 | + V_f[_i] = | ||
3881 | + V_f[_i + _skip] >> _down | V_f[_i + _skip + | ||
3882 | + 1] << _up; | ||
3883 | + V_f[_i++] = V_f[3] >> _down; | ||
3884 | + } | ||
3885 | + for (; _i < 4; ++_i) | ||
3886 | + V_f[_i] = 0; | ||
3887 | + } | ||
3888 | + while (0); | ||
3889 | + do | ||
3890 | + { | ||
3891 | + R_f0 = V_f[0]; | ||
3892 | + R_f1 = V_f[1]; | ||
3893 | + } | ||
3894 | + while (0); | ||
3895 | + (R_f1) |= ((unsigned long) 1 << (53 - 2 + 3) % 32); | ||
3896 | + } | ||
3897 | + } | ||
3898 | + } | ||
3899 | + } | ||
3900 | + while (0); | ||
3901 | + | ||
3902 | +/* FP_PACK_SEMIRAW_D(r,R) */ | ||
3903 | + do | ||
3904 | + { | ||
3905 | + do | ||
3906 | + { | ||
3907 | + do | ||
3908 | + { | ||
3909 | + if ((R_f0) & 7) | ||
3910 | + _fex |= (0); | ||
3911 | + switch (0) | ||
3912 | + { | ||
3913 | + case 0: | ||
3914 | + do | ||
3915 | + { | ||
3916 | + if (((R_f0) & 15) != ((unsigned long) 1 << 2)) | ||
3917 | + do | ||
3918 | + { | ||
3919 | + if (__builtin_constant_p (0) && (0) == 0) | ||
3920 | + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0), | ||
3921 | + "rI" (((unsigned long) 1 << | ||
3922 | + 2))); | ||
3923 | + else if (__builtin_constant_p (0) | ||
3924 | + && (0) == ~(USItype) 0) | ||
3925 | + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0), | ||
3926 | + "rI" (((unsigned long) 1 << | ||
3927 | + 2))); | ||
3928 | + else | ||
3929 | + __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3": "=r" (R_f1), "=&r" (R_f0):"%r" (R_f1), "r" (0), "%r" (R_f0), | ||
3930 | + "rI" (((unsigned long) 1 << | ||
3931 | + 2))); | ||
3932 | + } | ||
3933 | + while (0); | ||
3934 | + } | ||
3935 | + while (0); | ||
3936 | + break; | ||
3937 | + case 1: | ||
3938 | + (void) 0; | ||
3939 | + break; | ||
3940 | + case 2: | ||
3941 | + do | ||
3942 | + { | ||
3943 | + if (!R_s && ((R_f0) & 7)) | ||
3944 | + do | ||
3945 | + { | ||
3946 | + if (__builtin_constant_p (0) && (0) == 0) | ||
3947 | + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0), | ||
3948 | + "rI" (((unsigned long) 1 << | ||
3949 | + 3))); | ||
3950 | + else if (__builtin_constant_p (0) | ||
3951 | + && (0) == ~(USItype) 0) | ||
3952 | + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0), | ||
3953 | + "rI" (((unsigned long) 1 << | ||
3954 | + 3))); | ||
3955 | + else | ||
3956 | + __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3": "=r" (R_f1), "=&r" (R_f0):"%r" (R_f1), "r" (0), "%r" (R_f0), | ||
3957 | + "rI" (((unsigned long) 1 << | ||
3958 | + 3))); | ||
3959 | + } | ||
3960 | + while (0); | ||
3961 | + } | ||
3962 | + while (0); | ||
3963 | + break; | ||
3964 | + case 3: | ||
3965 | + do | ||
3966 | + { | ||
3967 | + if (R_s && ((R_f0) & 7)) | ||
3968 | + do | ||
3969 | + { | ||
3970 | + if (__builtin_constant_p (0) && (0) == 0) | ||
3971 | + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0), | ||
3972 | + "rI" (((unsigned long) 1 << | ||
3973 | + 3))); | ||
3974 | + else if (__builtin_constant_p (0) | ||
3975 | + && (0) == ~(USItype) 0) | ||
3976 | + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0), | ||
3977 | + "rI" (((unsigned long) 1 << | ||
3978 | + 3))); | ||
3979 | + else | ||
3980 | + __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3": "=r" (R_f1), "=&r" (R_f0):"%r" (R_f1), "r" (0), "%r" (R_f0), | ||
3981 | + "rI" (((unsigned long) 1 << | ||
3982 | + 3))); | ||
3983 | + } | ||
3984 | + while (0); | ||
3985 | + } | ||
3986 | + while (0); | ||
3987 | + break; | ||
3988 | + } | ||
3989 | + } | ||
3990 | + while (0); | ||
3991 | + if ((R_f1) & (((unsigned long) 1 << (3 + 53) % 32) >> 1)) | ||
3992 | + { | ||
3993 | + (R_f1) &= ~(((unsigned long) 1 << (3 + 53) % 32) >> 1); | ||
3994 | + R_e++; | ||
3995 | + if (R_e == 2047) | ||
3996 | + do | ||
3997 | + { | ||
3998 | + if (0 == 0 || (0 == 2 && !R_s) || (0 == 3 && R_s)) | ||
3999 | + { | ||
4000 | + R_e = 2047; | ||
4001 | + (R_f0 = 0, R_f1 = 0); | ||
4002 | + } | ||
4003 | + else | ||
4004 | + { | ||
4005 | + R_e = 2047 - 1; | ||
4006 | + _fex |= (0); | ||
4007 | + _fex |= (0); | ||
4008 | + (R_f0 = (~(signed long) 0), R_f1 = | ||
4009 | + (~(signed long) 0)); | ||
4010 | + } | ||
4011 | + } | ||
4012 | + while (0); | ||
4013 | + } | ||
4014 | + (void) (((3) < 32) ? ( | ||
4015 | + { | ||
4016 | + R_f0 = R_f0 >> (3) | R_f1 << (32 - (3)); R_f1 >>= (3);}):( | ||
4017 | + { | ||
4018 | + R_f0 = R_f1 >> ((3) - 32); R_f1 = 0;})); | ||
4019 | + if (!(((R_e + 1) & 2047) > 1) && !((R_f1 | R_f0) == 0)) | ||
4020 | + { | ||
4021 | + if (R_e == 0) | ||
4022 | + _fex |= (0); | ||
4023 | + else | ||
4024 | + { | ||
4025 | + if (!1) | ||
4026 | + { | ||
4027 | + (R_f0 = -1, R_f1 = | ||
4028 | + ((((unsigned long) 1 << (53 - 2) % 32) << 1) - 1)); | ||
4029 | + R_s = 0; | ||
4030 | + } | ||
4031 | + else | ||
4032 | + (R_f1) |= ((unsigned long) 1 << (53 - 2) % 32); | ||
4033 | + } | ||
4034 | + } | ||
4035 | + } | ||
4036 | + while (0); | ||
4037 | + do | ||
4038 | + { | ||
4039 | + union _FP_UNION_D _flo; | ||
4040 | + _flo.bits.frac0 = R_f0; | ||
4041 | + _flo.bits.frac1 = R_f1; | ||
4042 | + _flo.bits.exp = R_e; | ||
4043 | + _flo.bits.sign = R_s; | ||
4044 | + (r) = _flo.flt; | ||
4045 | + } | ||
4046 | + while (0); | ||
4047 | + } | ||
4048 | + while (0); | ||
4049 | + | ||
4050 | +/* FP_HANDLE_EXCEPTIONS */ | ||
4051 | + do | ||
4052 | + { | ||
4053 | + } | ||
4054 | + while (0); | ||
4055 | + | ||
4056 | + return r; | ||
4057 | +} | ||
4058 | + | ||
4059 | + | ||
4060 | +#endif | ||
4061 | + | ||
4062 | #endif | ||
4063 | diff -urN gcc42-trunc-20060802/gcc/config/rs6000/libgcc-ppc-glibc.ver gcc42-patched-20060802/gcc/config/rs6000/libgcc-ppc-glibc.ver | ||
4064 | --- gcc42-trunc-20060802/gcc/config/rs6000/libgcc-ppc-glibc.ver 2006-08-02 11:07:16.000000000 -0500 | ||
4065 | +++ gcc42-patched-20060802/gcc/config/rs6000/libgcc-ppc-glibc.ver 2006-09-01 08:28:29.000000000 -0500 | ||
4066 | @@ -21,11 +21,32 @@ | ||
4067 | %else | ||
4068 | GCC_3.4.4 { | ||
4069 | %endif | ||
4070 | +%else | ||
4071 | +GCC_4.2.0 { | ||
4072 | +%endif | ||
4073 | |||
4074 | # long double support | ||
4075 | __gcc_qadd | ||
4076 | __gcc_qsub | ||
4077 | __gcc_qmul | ||
4078 | __gcc_qdiv | ||
4079 | -} | ||
4080 | + | ||
4081 | +%ifdef _SOFT_FLOAT | ||
4082 | + __gcc_qneg | ||
4083 | + __gcc_qeq | ||
4084 | + __gcc_qne | ||
4085 | + __gcc_ggt | ||
4086 | + __gcc_qge | ||
4087 | + __gcc_qlt | ||
4088 | + __gcc_qle | ||
4089 | + __gcc_qunord | ||
4090 | + __gcc_stoq | ||
4091 | + __gcc_dtoq | ||
4092 | + __gcc_qtos | ||
4093 | + __gcc_qtod | ||
4094 | + __gcc_qtoi | ||
4095 | + __gcc_qtou | ||
4096 | + __gcc_itoq | ||
4097 | + __gcc_utoq | ||
4098 | %endif | ||
4099 | +} | ||
4100 | diff -urN gcc42-trunc-20060802/gcc/config/rs6000/rs6000.c gcc42-patched-20060802/gcc/config/rs6000/rs6000.c | ||
4101 | --- gcc42-trunc-20060802/gcc/config/rs6000/rs6000.c 2006-08-02 11:07:16.000000000 -0500 | ||
4102 | +++ gcc42-patched-20060802/gcc/config/rs6000/rs6000.c 2006-09-01 08:28:29.000000000 -0500 | ||
4103 | @@ -4016,8 +4016,7 @@ | ||
4104 | |||
4105 | /* 128-bit constant floating-point values on Darwin should really be | ||
4106 | loaded as two parts. */ | ||
4107 | - if (!TARGET_IEEEQUAD | ||
4108 | - && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128 | ||
4109 | + if (!TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128 | ||
4110 | && mode == TFmode && GET_CODE (operands[1]) == CONST_DOUBLE) | ||
4111 | { | ||
4112 | /* DImode is used, not DFmode, because simplify_gen_subreg doesn't | ||
4113 | @@ -9175,9 +9174,6 @@ | ||
4114 | static void | ||
4115 | rs6000_init_libfuncs (void) | ||
4116 | { | ||
4117 | - if (!TARGET_HARD_FLOAT) | ||
4118 | - return; | ||
4119 | - | ||
4120 | if (DEFAULT_ABI != ABI_V4 && TARGET_XCOFF | ||
4121 | && !TARGET_POWER2 && !TARGET_POWERPC) | ||
4122 | { | ||
4123 | @@ -9196,6 +9192,27 @@ | ||
4124 | set_optab_libfunc (sub_optab, TFmode, "__gcc_qsub"); | ||
4125 | set_optab_libfunc (smul_optab, TFmode, "__gcc_qmul"); | ||
4126 | set_optab_libfunc (sdiv_optab, TFmode, "__gcc_qdiv"); | ||
4127 | + | ||
4128 | + if (TARGET_SOFT_FLOAT) | ||
4129 | + { | ||
4130 | + set_optab_libfunc (neg_optab, TFmode, "__gcc_qneg"); | ||
4131 | + set_optab_libfunc (eq_optab, TFmode, "__gcc_qeq"); | ||
4132 | + set_optab_libfunc (ne_optab, TFmode, "__gcc_qne"); | ||
4133 | + set_optab_libfunc (gt_optab, TFmode, "__gcc_qgt"); | ||
4134 | + set_optab_libfunc (ge_optab, TFmode, "__gcc_qge"); | ||
4135 | + set_optab_libfunc (lt_optab, TFmode, "__gcc_qlt"); | ||
4136 | + set_optab_libfunc (le_optab, TFmode, "__gcc_qle"); | ||
4137 | + set_optab_libfunc (unord_optab, TFmode, "__gcc_qunord"); | ||
4138 | + | ||
4139 | + set_conv_libfunc (sext_optab, TFmode, SFmode, "__gcc_stoq"); | ||
4140 | + set_conv_libfunc (sext_optab, TFmode, DFmode, "__gcc_dtoq"); | ||
4141 | + set_conv_libfunc (trunc_optab, SFmode, TFmode, "__gcc_qtos"); | ||
4142 | + set_conv_libfunc (trunc_optab, DFmode, TFmode, "__gcc_qtod"); | ||
4143 | + set_conv_libfunc (sfix_optab, SImode, TFmode, "__gcc_qtoi"); | ||
4144 | + set_conv_libfunc (ufix_optab, SImode, TFmode, "__gcc_qtou"); | ||
4145 | + set_conv_libfunc (sfloat_optab, TFmode, SImode, "__gcc_itoq"); | ||
4146 | + set_conv_libfunc (ufloat_optab, TFmode, SImode, "__gcc_utoq"); | ||
4147 | + } | ||
4148 | } | ||
4149 | else | ||
4150 | { | ||
4151 | diff -urN gcc42-trunc-20060802/gcc/config/rs6000/rs6000.md gcc42-patched-20060802/gcc/config/rs6000/rs6000.md | ||
4152 | --- gcc42-trunc-20060802/gcc/config/rs6000/rs6000.md 2006-08-02 11:07:16.000000000 -0500 | ||
4153 | +++ gcc42-patched-20060802/gcc/config/rs6000/rs6000.md 2006-09-01 08:28:29.000000000 -0500 | ||
4154 | @@ -7920,42 +7920,44 @@ | ||
4155 | "") | ||
4156 | |||
4157 | (define_insn "*movcc_internal1" | ||
4158 | - [(set (match_operand:CC 0 "nonimmediate_operand" "=y,x,?y,r,r,r,r,q,cl,r,m") | ||
4159 | - (match_operand:CC 1 "nonimmediate_operand" "y,r,r,x,y,r,h,r,r,m,r"))] | ||
4160 | + [(set (match_operand:CC 0 "nonimmediate_operand" "=y,x,?y,y,r,r,r,r,r,q,cl,r,m") | ||
4161 | + (match_operand:CC 1 "general_operand" "y,r,r,O,x,y,r,I,h,r,r,m,r"))] | ||
4162 | "register_operand (operands[0], CCmode) | ||
4163 | || register_operand (operands[1], CCmode)" | ||
4164 | "@ | ||
4165 | mcrf %0,%1 | ||
4166 | mtcrf 128,%1 | ||
4167 | {rlinm|rlwinm} %1,%1,%F0,0xffffffff\;mtcrf %R0,%1\;{rlinm|rlwinm} %1,%1,%f0,0xffffffff | ||
4168 | + crxor %0,%0,%0 | ||
4169 | mfcr %0%Q1 | ||
4170 | mfcr %0%Q1\;{rlinm|rlwinm} %0,%0,%f1,0xf0000000 | ||
4171 | mr %0,%1 | ||
4172 | + {lil|li} %0,%1 | ||
4173 | mf%1 %0 | ||
4174 | mt%0 %1 | ||
4175 | mt%0 %1 | ||
4176 | {l%U1%X1|lwz%U1%X1} %0,%1 | ||
4177 | {st%U0%U1|stw%U0%U1} %1,%0" | ||
4178 | [(set (attr "type") | ||
4179 | - (cond [(eq_attr "alternative" "0") | ||
4180 | + (cond [(eq_attr "alternative" "0,3") | ||
4181 | (const_string "cr_logical") | ||
4182 | (eq_attr "alternative" "1,2") | ||
4183 | (const_string "mtcr") | ||
4184 | - (eq_attr "alternative" "5,7") | ||
4185 | + (eq_attr "alternative" "6,7,9") | ||
4186 | (const_string "integer") | ||
4187 | - (eq_attr "alternative" "6") | ||
4188 | - (const_string "mfjmpr") | ||
4189 | (eq_attr "alternative" "8") | ||
4190 | + (const_string "mfjmpr") | ||
4191 | + (eq_attr "alternative" "10") | ||
4192 | (const_string "mtjmpr") | ||
4193 | - (eq_attr "alternative" "9") | ||
4194 | + (eq_attr "alternative" "11") | ||
4195 | (const_string "load") | ||
4196 | - (eq_attr "alternative" "10") | ||
4197 | + (eq_attr "alternative" "12") | ||
4198 | (const_string "store") | ||
4199 | (ne (symbol_ref "TARGET_MFCRF") (const_int 0)) | ||
4200 | (const_string "mfcrf") | ||
4201 | ] | ||
4202 | (const_string "mfcr"))) | ||
4203 | - (set_attr "length" "4,4,12,4,8,4,4,4,4,4,4")]) | ||
4204 | + (set_attr "length" "4,4,12,4,4,8,4,4,4,4,4,4,4")]) | ||
4205 | |||
4206 | ;; For floating-point, we normally deal with the floating-point registers | ||
4207 | ;; unless -msoft-float is used. The sole exception is that parameter passing | ||
4208 | @@ -8313,8 +8315,7 @@ | ||
4209 | (define_expand "movtf" | ||
4210 | [(set (match_operand:TF 0 "general_operand" "") | ||
4211 | (match_operand:TF 1 "any_operand" ""))] | ||
4212 | - "!TARGET_IEEEQUAD | ||
4213 | - && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" | ||
4214 | + "!TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128" | ||
4215 | "{ rs6000_emit_move (operands[0], operands[1], TFmode); DONE; }") | ||
4216 | |||
4217 | ; It's important to list the o->f and f->o moves before f->f because | ||
4218 | @@ -8333,6 +8334,19 @@ | ||
4219 | { rs6000_split_multireg_move (operands[0], operands[1]); DONE; } | ||
4220 | [(set_attr "length" "8,8,8,20,20,16")]) | ||
4221 | |||
4222 | +(define_insn_and_split "*movtf_softfloat" | ||
4223 | + [(set (match_operand:TF 0 "nonimmediate_operand" "=r,Y,r") | ||
4224 | + (match_operand:TF 1 "input_operand" "YGHF,r,r"))] | ||
4225 | + "!TARGET_IEEEQUAD | ||
4226 | + && (TARGET_SOFT_FLOAT || !TARGET_FPRS) && TARGET_LONG_DOUBLE_128 | ||
4227 | + && (gpc_reg_operand (operands[0], TFmode) | ||
4228 | + || gpc_reg_operand (operands[1], TFmode))" | ||
4229 | + "#" | ||
4230 | + "&& reload_completed" | ||
4231 | + [(pc)] | ||
4232 | +{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; } | ||
4233 | + [(set_attr "length" "20,20,16")]) | ||
4234 | + | ||
4235 | (define_expand "extenddftf2" | ||
4236 | [(parallel [(set (match_operand:TF 0 "nonimmediate_operand" "") | ||
4237 | (float_extend:TF (match_operand:DF 1 "input_operand" ""))) | ||
4238 | diff -urN gcc42-trunc-20060802/gcc/config/rs6000/sysv4.h gcc42-patched-20060802/gcc/config/rs6000/sysv4.h | ||
4239 | --- gcc42-trunc-20060802/gcc/config/rs6000/sysv4.h 2006-08-02 11:07:16.000000000 -0500 | ||
4240 | +++ gcc42-patched-20060802/gcc/config/rs6000/sysv4.h 2006-09-01 08:28:29.000000000 -0500 | ||
4241 | @@ -215,10 +215,6 @@ | ||
4242 | error ("-msecure-plt not supported by your assembler"); \ | ||
4243 | } \ | ||
4244 | \ | ||
4245 | - if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128 \ | ||
4246 | - && rs6000_explicit_options.long_double) \ | ||
4247 | - warning (0, "-msoft-float and -mlong-double-128 not supported"); \ | ||
4248 | - \ | ||
4249 | /* Treat -fPIC the same as -mrelocatable. */ \ | ||
4250 | if (flag_pic > 1 && DEFAULT_ABI != ABI_AIX) \ | ||
4251 | { \ | ||
4252 | diff -urN gcc42-trunc-20060802/gcc/config/rs6000/t-ppccomm gcc42-patched-20060802/gcc/config/rs6000/t-ppccomm | ||
4253 | --- gcc42-trunc-20060802/gcc/config/rs6000/t-ppccomm 2006-08-02 11:07:16.000000000 -0500 | ||
4254 | +++ gcc42-patched-20060802/gcc/config/rs6000/t-ppccomm 2006-09-01 08:28:29.000000000 -0500 | ||
4255 | @@ -12,15 +12,8 @@ | ||
4256 | cat $(srcdir)/config/rs6000/tramp.asm > tramp.S | ||
4257 | |||
4258 | ifneq (,$findstring gnu,$(target)) | ||
4259 | -TARGET_LIBGCC2_CFLAGS += -specs=ldblspecs | ||
4260 | - | ||
4261 | +TARGET_LIBGCC2_CFLAGS += -mlong-double-128 | ||
4262 | SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc-glibc.ver | ||
4263 | - | ||
4264 | -# Hack to use -mlong-double-128 only when not compiling nof libgcc | ||
4265 | -mklibgcc: ldblspecs | ||
4266 | - | ||
4267 | -ldblspecs: specs | ||
4268 | - sed -e '/cc1_options/{ n; s/$$/ %{!msoft-float:-mlong-double-128}/; }' < specs > $@ | ||
4269 | endif | ||
4270 | |||
4271 | # Switch synonyms | ||