Lines Matching refs:mode

32   return (a->mode == b->mode  in fixed_identical()
62 check_real_for_fixed_mode (REAL_VALUE_TYPE *real_value, enum machine_mode mode) in check_real_for_fixed_mode() argument
66 real_2expN (&max_value, GET_MODE_IBIT (mode), mode); in check_real_for_fixed_mode()
67 real_2expN (&epsilon_value, -GET_MODE_FBIT (mode), mode); in check_real_for_fixed_mode()
69 if (SIGNED_FIXED_POINT_MODE_P (mode)) in check_real_for_fixed_mode()
87 fixed_from_string (FIXED_VALUE_TYPE *f, const char *str, enum machine_mode mode) in fixed_from_string() argument
93 f->mode = mode; in fixed_from_string()
94 fbit = GET_MODE_FBIT (mode); in fixed_from_string()
97 temp = check_real_for_fixed_mode (&real_value, f->mode); in fixed_from_string()
101 || (temp == FIXED_MAX_EPS && ALL_ACCUM_MODE_P (f->mode))) in fixed_from_string()
104 real_2expN (&base_value, fbit, mode); in fixed_from_string()
109 if (temp == FIXED_MAX_EPS && ALL_FRACT_MODE_P (f->mode)) in fixed_from_string()
115 GET_MODE_FBIT (f->mode) in fixed_from_string()
116 + GET_MODE_IBIT (f->mode), 1); in fixed_from_string()
120 SIGNED_FIXED_POINT_MODE_P (f->mode) in fixed_from_string()
121 + GET_MODE_FBIT (f->mode) in fixed_from_string()
122 + GET_MODE_IBIT (f->mode), in fixed_from_string()
123 UNSIGNED_FIXED_POINT_MODE_P (f->mode)); in fixed_from_string()
134 real_2expN (&base_value, GET_MODE_FBIT (f_orig->mode), f_orig->mode); in fixed_to_decimal()
136 UNSIGNED_FIXED_POINT_MODE_P (f_orig->mode)); in fixed_to_decimal()
150 fixed_saturate1 (enum machine_mode mode, double_int a, double_int *f, in fixed_saturate1() argument
154 bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (mode); in fixed_saturate1()
155 int i_f_bits = GET_MODE_IBIT (mode) + GET_MODE_FBIT (mode); in fixed_saturate1()
210 fixed_saturate2 (enum machine_mode mode, double_int a_high, double_int a_low, in fixed_saturate2() argument
214 bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (mode); in fixed_saturate2()
215 int i_f_bits = GET_MODE_IBIT (mode) + GET_MODE_FBIT (mode); in fixed_saturate2()
304 unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode); in do_fixed_add()
305 i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode); in do_fixed_add()
306 f->mode = a->mode; in do_fixed_add()
384 bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode); in do_fixed_multiply()
385 int i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode); in do_fixed_multiply()
386 f->mode = a->mode; in do_fixed_multiply()
387 if (GET_MODE_PRECISION (f->mode) <= HOST_BITS_PER_WIDE_INT) in do_fixed_multiply()
391 (-GET_MODE_FBIT (f->mode)), in do_fixed_multiply()
394 overflow_p = fixed_saturate1 (f->mode, f->data, &f->data, sat_p); in do_fixed_multiply()
454 if (GET_MODE_FBIT (f->mode) == 2 * HOST_BITS_PER_WIDE_INT) in do_fixed_multiply()
474 (-GET_MODE_FBIT (f->mode)), in do_fixed_multiply()
479 - GET_MODE_FBIT (f->mode)), in do_fixed_multiply()
487 (-GET_MODE_FBIT (f->mode)), in do_fixed_multiply()
492 overflow_p = fixed_saturate2 (f->mode, r, s, &f->data, sat_p); in do_fixed_multiply()
508 bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode); in do_fixed_divide()
509 int i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode); in do_fixed_divide()
510 f->mode = a->mode; in do_fixed_divide()
511 if (GET_MODE_PRECISION (f->mode) <= HOST_BITS_PER_WIDE_INT) in do_fixed_divide()
514 GET_MODE_FBIT (f->mode), in do_fixed_divide()
518 overflow_p = fixed_saturate1 (f->mode, f->data, &f->data, sat_p); in do_fixed_divide()
546 if (GET_MODE_FBIT (f->mode) == 2 * HOST_BITS_PER_WIDE_INT) in do_fixed_divide()
555 GET_MODE_FBIT (f->mode), in do_fixed_divide()
560 - GET_MODE_FBIT (f->mode)), in do_fixed_divide()
618 overflow_p = fixed_saturate2 (f->mode, quo_r, quo_s, &f->data, sat_p); in do_fixed_divide()
634 bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode); in do_fixed_shift()
635 int i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode); in do_fixed_shift()
636 f->mode = a->mode; in do_fixed_shift()
644 if (GET_MODE_PRECISION (f->mode) <= HOST_BITS_PER_WIDE_INT || (!left_p)) in do_fixed_shift()
651 overflow_p = fixed_saturate1 (f->mode, f->data, &f->data, sat_p); in do_fixed_shift()
677 overflow_p = fixed_saturate2 (f->mode, temp_high, temp_low, &f->data, in do_fixed_shift()
692 bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode); in do_fixed_neg()
693 int i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode); in do_fixed_neg()
694 f->mode = a->mode; in do_fixed_neg()
746 gcc_assert (op0->mode == op1->mode); in fixed_arithmetic()
751 gcc_assert (op0->mode == op1->mode); in fixed_arithmetic()
756 gcc_assert (op0->mode == op1->mode); in fixed_arithmetic()
761 gcc_assert (op0->mode == op1->mode); in fixed_arithmetic()
787 gcc_assert (op0->mode == op1->mode); in fixed_compare()
799 UNSIGNED_FIXED_POINT_MODE_P (op0->mode)) == -1; in fixed_compare()
803 UNSIGNED_FIXED_POINT_MODE_P (op0->mode)) != 1; in fixed_compare()
807 UNSIGNED_FIXED_POINT_MODE_P (op0->mode)) == 1; in fixed_compare()
811 UNSIGNED_FIXED_POINT_MODE_P (op0->mode)) != -1; in fixed_compare()
823 fixed_convert (FIXED_VALUE_TYPE *f, enum machine_mode mode, in fixed_convert() argument
827 if (mode == a->mode) in fixed_convert()
833 if (GET_MODE_FBIT (mode) > GET_MODE_FBIT (a->mode)) in fixed_convert()
837 int amount = GET_MODE_FBIT (mode) - GET_MODE_FBIT (a->mode); in fixed_convert()
842 SIGNED_FIXED_POINT_MODE_P (a->mode)); in fixed_convert()
848 if (SIGNED_FIXED_POINT_MODE_P (a->mode) in fixed_convert()
851 f->mode = mode; in fixed_convert()
853 if (SIGNED_FIXED_POINT_MODE_P (a->mode) == in fixed_convert()
854 SIGNED_FIXED_POINT_MODE_P (f->mode)) in fixed_convert()
855 overflow_p = fixed_saturate2 (f->mode, temp_high, temp_low, &f->data, in fixed_convert()
861 if (SIGNED_FIXED_POINT_MODE_P (a->mode)) in fixed_convert()
875 overflow_p = fixed_saturate2 (f->mode, temp_high, temp_low, in fixed_convert()
889 GET_MODE_FBIT (f->mode) in fixed_convert()
890 + GET_MODE_IBIT (f->mode), in fixed_convert()
897 overflow_p = fixed_saturate2 (f->mode, temp_high, temp_low, in fixed_convert()
907 GET_MODE_FBIT (mode) - GET_MODE_FBIT (a->mode), in fixed_convert()
910 SIGNED_FIXED_POINT_MODE_P (a->mode)); in fixed_convert()
911 f->mode = mode; in fixed_convert()
913 if (SIGNED_FIXED_POINT_MODE_P (a->mode) == in fixed_convert()
914 SIGNED_FIXED_POINT_MODE_P (f->mode)) in fixed_convert()
915 overflow_p = fixed_saturate1 (f->mode, f->data, &f->data, sat_p); in fixed_convert()
920 if (SIGNED_FIXED_POINT_MODE_P (a->mode)) in fixed_convert()
934 overflow_p = fixed_saturate1 (f->mode, f->data, &f->data, in fixed_convert()
948 GET_MODE_FBIT (f->mode) in fixed_convert()
949 + GET_MODE_IBIT (f->mode), in fixed_convert()
956 overflow_p = fixed_saturate1 (f->mode, f->data, &f->data, in fixed_convert()
963 SIGNED_FIXED_POINT_MODE_P (f->mode) in fixed_convert()
964 + GET_MODE_FBIT (f->mode) in fixed_convert()
965 + GET_MODE_IBIT (f->mode), in fixed_convert()
966 UNSIGNED_FIXED_POINT_MODE_P (f->mode)); in fixed_convert()
976 fixed_convert_from_int (FIXED_VALUE_TYPE *f, enum machine_mode mode, in fixed_convert_from_int() argument
982 int amount = GET_MODE_FBIT (mode); in fixed_convert_from_int()
1005 f->mode = mode; in fixed_convert_from_int()
1008 if (unsigned_p == UNSIGNED_FIXED_POINT_MODE_P (f->mode)) in fixed_convert_from_int()
1009 overflow_p = fixed_saturate2 (f->mode, temp_high, temp_low, &f->data, in fixed_convert_from_int()
1028 overflow_p = fixed_saturate2 (f->mode, temp_high, temp_low, in fixed_convert_from_int()
1042 GET_MODE_FBIT (f->mode) in fixed_convert_from_int()
1043 + GET_MODE_IBIT (f->mode), in fixed_convert_from_int()
1050 overflow_p = fixed_saturate2 (f->mode, temp_high, temp_low, in fixed_convert_from_int()
1055 SIGNED_FIXED_POINT_MODE_P (f->mode) in fixed_convert_from_int()
1056 + GET_MODE_FBIT (f->mode) in fixed_convert_from_int()
1057 + GET_MODE_IBIT (f->mode), in fixed_convert_from_int()
1058 UNSIGNED_FIXED_POINT_MODE_P (f->mode)); in fixed_convert_from_int()
1067 fixed_convert_from_real (FIXED_VALUE_TYPE *f, enum machine_mode mode, in fixed_convert_from_real() argument
1072 bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (mode); in fixed_convert_from_real()
1073 int i_f_bits = GET_MODE_IBIT (mode) + GET_MODE_FBIT (mode); in fixed_convert_from_real()
1074 unsigned int fbit = GET_MODE_FBIT (mode); in fixed_convert_from_real()
1078 f->mode = mode; in fixed_convert_from_real()
1079 real_2expN (&base_value, fbit, mode); in fixed_convert_from_real()
1082 temp = check_real_for_fixed_mode (&real_value, mode); in fixed_convert_from_real()
1123 real_convert_from_fixed (REAL_VALUE_TYPE *r, enum machine_mode mode, in real_convert_from_fixed() argument
1128 real_2expN (&base_value, GET_MODE_FBIT (f->mode), f->mode); in real_convert_from_fixed()
1130 UNSIGNED_FIXED_POINT_MODE_P (f->mode)); in real_convert_from_fixed()
1132 real_convert (r, mode, &real_value); in real_convert_from_fixed()
1140 if (SIGNED_FIXED_POINT_MODE_P (f->mode)) in fixed_isneg()
1142 int i_f_bits = GET_MODE_IBIT (f->mode) + GET_MODE_FBIT (f->mode); in fixed_isneg()