Home | History | Annotate | Download | only in useful

Lines Matching refs:f80

44 static void convert_f80le_to_f64le_HW ( /*IN*/UChar* f80, /*OUT*/UChar* f64 )
48 : "r" (&f80[0]), "r" (&f64[0])
52 static void convert_f64le_to_f80le_HW ( /*IN*/UChar* f64, /*OUT*/UChar* f80 )
56 : "r" (&f64[0]), "r" (&f80[0])
103 static void convert_f64le_to_f80le ( /*IN*/UChar* f64, /*OUT*/UChar* f80 )
130 f80[9] = toUChar( sign << 7 );
131 f80[8] = f80[7] = f80[6] = f80[5] = f80[4]
132 = f80[3] = f80[2] = f80[1] = f80[0] = 0;
153 write_bit_array( f80, j,
161 f80[9] = toUChar( (sign << 7) | ((bexp >> 8) & 0xFF) );
162 f80[8] = toUChar( bexp & 0xFF );
178 f80[9] = toUChar( (sign << 7) | 0x7F );
179 f80[8] = 0xFF;
180 f80[7] = 0x80;
181 f80[6] = f80[5] = f80[4] = f80[3]
182 = f80[2] = f80[1] = f80[0] = 0;
196 f80[9] = toUChar( (sign << 7) | 0x7F );
197 f80[8] = 0xFF;
198 f80[7] = 0xFF;
199 f80[6] = f80[5] = f80[4] = f80[3]
200 = f80[2] = f80[1] = f80[0] = 0xFF;
205 f80[9] = toUChar( (sign << 7) | 0x7F );
206 f80[8] = 0xFF;
207 f80[7] = 0x7F;
208 f80[6] = f80[5] = f80[4] = f80[3]
209 = f80[2] = f80[1] = f80[0] = 0xFF;
219 f80[9] = toUChar( (sign << 7) | ((bexp >> 8) & 0xFF) );
220 f80[8] = toUChar( bexp & 0xFF );
221 f80[7] = toUChar( (1 << 7) | ((f64[6] << 3) & 0x78)
223 f80[6] = toUChar( ((f64[5] << 3) & 0xF8) | ((f64[4] >> 5) & 7) );
224 f80[5] = toUChar( ((f64[4] << 3) & 0xF8) | ((f64[3] >> 5) & 7) );
225 f80[4] = toUChar( ((f64[3] << 3) & 0xF8) | ((f64[2] >> 5) & 7) );
226 f80[3] = toUChar( ((f64[2] << 3) & 0xF8) | ((f64[1] >> 5) & 7) );
227 f80[2] = toUChar( ((f64[1] << 3) & 0xF8) | ((f64[0] >> 5) & 7) );
228 f80[1] = toUChar( ((f64[0] << 3) & 0xF8) );
229 f80[0] = toUChar( 0 );
244 static void convert_f80le_to_f64le ( /*IN*/UChar* f80, /*OUT*/UChar* f64 )
250 sign = toUChar((f80[9] >> 7) & 1);
251 bexp = (((UInt)f80[9]) << 8) | (UInt)f80[8];
273 (f80[7] & 0x7F) == 0
274 && f80[6] == 0 && f80[5] == 0 && f80[4] == 0
275 && f80[3] == 0 && f80[2] == 0 && f80[1] == 0
276 && f80[0] == 0
279 if (0 == (f80[7] & 0x80))
296 if (f80[8] & 0x40) {
317 if (0 == (f80[7] & 0x80)) {
362 read_bit_array ( f80, i ) );
365 if (read_bit_array(f80, 10+1 - bexp) == 1)
377 read_bit_array ( f80, i+11 ) );
379 f64[0] = toUChar( (f80[1] >> 3) | (f80[2] << 5) );
380 f64[1] = toUChar( (f80[2] >> 3) | (f80[3] << 5) );
381 f64[2] = toUChar( (f80[3] >> 3) | (f80[4] << 5) );
382 f64[3] = toUChar( (f80[4] >> 3) | (f80[5] << 5) );
383 f64[4] = toUChar( (f80[5] >> 3) | (f80[6] << 5) );
384 f64[5] = toUChar( (f80[6] >> 3) | (f80[7] << 5) );
386 f64[6] = toUChar( ((bexp << 4) & 0xF0) | ((f80[7] >> 3) & 0x0F) );
392 if (f80[1] & 4) /* read_bit_array(f80, 10) == 1) */ {
394 /* If the bottom bits of f80 are "100 0000 0000", then the
401 if ((f80[1] & 0xF) == 4/*0100b*/ && f80[0] == 0)
431 static void show_f80 ( UChar* f80 )
434 printf("%d ", read_bit_array(f80, 79));
437 printf("%d", read_bit_array(f80, i));
439 printf(" %d ", read_bit_array(f80, 63));
442 printf("%d", read_bit_array(f80, i));
461 /* Convert f80 to a 64-bit IEEE double using both the hardware and the
465 int do_80_to_64_test ( Int test_no, UChar* f80, UChar* f64h, UChar* f64s)
470 convert_f80le_to_f64le_HW(f80, f64h);
471 convert_f80le_to_f64le(f80, f64s);
490 printf("f80: "); show_f80(f80); printf("\n");
495 test_no, *(long double*)f80,
551 UChar* f80 = malloc(10);
560 f80[j] = (random() >> 7) & 255;
562 fails += do_80_to_64_test(tests, f80, f64h, f64s);
573 f80[i] = 0;
576 f80[9] = b9;
577 f80[8] = b8;
578 f80[7] = b7;
580 fails += do_80_to_64_test(tests, f80, f64h, f64s);