Lines Matching refs:fmt
65 static int floatformat_always_valid (const struct floatformat *fmt,
69 floatformat_always_valid (const struct floatformat *fmt ATTRIBUTE_UNUSED, in floatformat_always_valid()
169 static int floatformat_i387_ext_is_valid (const struct floatformat *fmt,
173 floatformat_i387_ext_is_valid (const struct floatformat *fmt, const void *from) in floatformat_i387_ext_is_valid() argument
182 exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize, in floatformat_i387_ext_is_valid()
183 fmt->exp_start, fmt->exp_len); in floatformat_i387_ext_is_valid()
184 int_bit = get_field (ufrom, fmt->byteorder, fmt->totalsize, in floatformat_i387_ext_is_valid()
185 fmt->man_start, 1); in floatformat_i387_ext_is_valid()
289 floatformat_ibm_long_double_is_valid (const struct floatformat *fmt, in floatformat_ibm_long_double_is_valid() argument
293 const struct floatformat *hfmt = fmt->split_half; in floatformat_ibm_long_double_is_valid()
400 mant_bits_set (const struct floatformat *fmt, const unsigned char *ufrom) in mant_bits_set() argument
405 mant_off = fmt->man_start; in mant_bits_set()
406 mant_bits_left = fmt->man_len; in mant_bits_set()
411 if (get_field (ufrom, fmt->byteorder, fmt->totalsize, in mant_bits_set()
466 floatformat_to_double (const struct floatformat *fmt, in floatformat_to_double() argument
480 exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize, in floatformat_to_double()
481 fmt->exp_start, fmt->exp_len); in floatformat_to_double()
486 if ((unsigned long) exponent == fmt->exp_nan) in floatformat_to_double()
488 int nan = mant_bits_set (fmt, ufrom); in floatformat_to_double()
502 if (get_field (ufrom, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1)) in floatformat_to_double()
510 mant_bits_left = fmt->man_len; in floatformat_to_double()
511 mant_off = fmt->man_start; in floatformat_to_double()
519 exponent = 1 - fmt->exp_bias; in floatformat_to_double()
522 exponent -= fmt->exp_bias; in floatformat_to_double()
528 if (fmt->intbit == floatformat_intbit_no) in floatformat_to_double()
538 mant = get_field (ufrom, fmt->byteorder, fmt->totalsize, in floatformat_to_double()
548 if (get_field (ufrom, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1)) in floatformat_to_double()
602 floatformat_from_double (const struct floatformat *fmt, in floatformat_from_double() argument
613 memset (uto, 0, fmt->totalsize / FLOATFORMAT_CHAR_BIT); in floatformat_from_double()
622 put_field (uto, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1, 1); in floatformat_from_double()
635 put_field (uto, fmt->byteorder, fmt->totalsize, fmt->exp_start, in floatformat_from_double()
636 fmt->exp_len, fmt->exp_nan); in floatformat_from_double()
638 put_field (uto, fmt->byteorder, fmt->totalsize, fmt->man_start, in floatformat_from_double()
647 put_field (uto, fmt->byteorder, fmt->totalsize, fmt->exp_start, in floatformat_from_double()
648 fmt->exp_len, fmt->exp_nan); in floatformat_from_double()
653 if (exponent + fmt->exp_bias - 1 > 0) in floatformat_from_double()
654 put_field (uto, fmt->byteorder, fmt->totalsize, fmt->exp_start, in floatformat_from_double()
655 fmt->exp_len, exponent + fmt->exp_bias - 1); in floatformat_from_double()
660 put_field (uto, fmt->byteorder, fmt->totalsize, fmt->exp_start, in floatformat_from_double()
661 fmt->exp_len, 0); in floatformat_from_double()
662 mant = ldexp (mant, exponent + fmt->exp_bias - 1); in floatformat_from_double()
665 mant_bits_left = fmt->man_len; in floatformat_from_double()
666 mant_off = fmt->man_start; in floatformat_from_double()
678 if ((unsigned int) mant_bits_left == fmt->man_len in floatformat_from_double()
679 && fmt->intbit == floatformat_intbit_no in floatformat_from_double()
680 && exponent + fmt->exp_bias - 1 > 0) in floatformat_from_double()
692 put_field (uto, fmt->byteorder, fmt->totalsize, in floatformat_from_double()
702 floatformat_is_valid (const struct floatformat *fmt, const void *from) in floatformat_is_valid() argument
704 return fmt->is_valid (fmt, from); in floatformat_is_valid()