Lines Matching refs:left

615 		unop_expr = condition->left;  in get_countdown_info()
716 if (get_sm_state_expr(SMATCH_EXTRA, condition->left) != sm) in handle_canonical_for_inc()
769 if (get_sm_state_expr(SMATCH_EXTRA, condition->left) != sm) in handle_canonical_for_dec()
1002 int values_fit_type(struct expression *left, struct expression *right) in values_fit_type() argument
1007 type = get_type(left); in values_fit_type()
1022 static void save_chunk_info(struct expression *left, struct expression *right) in save_chunk_info() argument
1034 if (!get_value(right->left, &sval)) in save_chunk_info()
1039 add_expr = binop_expression(left, '+', right->right); in save_chunk_info()
1055 static void do_array_assign(struct expression *left, int op, struct expression *right) in do_array_assign() argument
1061 rl = cast_rl(get_type(left), rl); in do_array_assign()
1063 rl = alloc_whole_rl(get_type(left)); in do_array_assign()
1066 set_extra_array_mod(left, alloc_estate_rl(rl)); in do_array_assign()
1069 static void match_vanilla_assign(struct expression *left, struct expression *right) in match_vanilla_assign() argument
1083 if (is_struct(left)) in match_vanilla_assign()
1086 save_chunk_info(left, right); in match_vanilla_assign()
1088 name = expr_to_var_sym(left, &sym); in match_vanilla_assign()
1090 if (chunk_has_array(left)) in match_vanilla_assign()
1091 do_array_assign(left, '=', right); in match_vanilla_assign()
1095 left_type = get_type(left); in match_vanilla_assign()
1103 values_fit_type(left, strip_expr(right)) && in match_vanilla_assign()
1105 set_equiv(left, right); in match_vanilla_assign()
1135 comparison = get_comparison_no_extra(left, right); in match_vanilla_assign()
1138 get_implied_rl(left, &orig_rl); in match_vanilla_assign()
1159 set_extra_mod(name, sym, left, state); in match_vanilla_assign()
1167 struct expression *left; in match_assign() local
1174 left = strip_expr(expr->left); in match_assign()
1180 right = strip_parens(right->left); in match_assign()
1187 match_vanilla_assign(left, right); in match_assign()
1191 name = expr_to_var_sym(left, &sym); in match_assign()
1195 left_type = get_type(left); in match_assign()
1208 binop_expr = binop_expression(expr->left, in match_assign()
1224 set_extra_mod(name, sym, left, alloc_estate_rl(rl)); in match_assign()
1227 set_extra_mod(name, sym, left, alloc_estate_whole(left_type)); in match_assign()
1425 static int handle_postop_inc(struct expression *left, int op, struct expression *right) in handle_postop_inc() argument
1441 if (left->type != EXPR_POSTOP || left->op != SPECIAL_INCREMENT) in handle_postop_inc()
1455 if (left != strip_expr(cond->left) || right != strip_expr(cond->right)) in handle_postop_inc()
1458 if (!get_implied_value(left->unop, &start)) in handle_postop_inc()
1462 type = get_type(left->unop); in handle_postop_inc()
1486 set_extra_expr_true_false(left->unop, true_state, false_state); in handle_postop_inc()
1501 static bool in_macro(struct expression *left, struct expression *right) in in_macro() argument
1503 if (!left || !right) in in_macro()
1505 if (left->pos.line != right->pos.line || left->pos.pos != right->pos.pos) in in_macro()
1507 if (get_macro_name(left->pos)) in in_macro()
1512 static void handle_comparison(struct symbol *type, struct expression *left, int op, struct expressi… in handle_comparison() argument
1528 if (left->op == SPECIAL_INCREMENT || left->op == SPECIAL_DECREMENT) { in handle_comparison()
1529 if (left->type == EXPR_POSTOP) { in handle_comparison()
1530 left->smatch_flags |= Handled; in handle_comparison()
1531 left_postop = left->op; in handle_comparison()
1532 if (handle_postop_inc(left, op, right)) in handle_comparison()
1535 left = strip_parens(left->unop); in handle_comparison()
1537 while (left->type == EXPR_ASSIGNMENT) in handle_comparison()
1538 left = strip_parens(left->left); in handle_comparison()
1548 if (is_impossible_variable(left) || is_impossible_variable(right)) in handle_comparison()
1551 get_real_absolute_rl(left, &left_orig); in handle_comparison()
1559 left_true = rl_truncate_cast(get_type(strip_expr(left)), left_true); in handle_comparison()
1560 left_false = rl_truncate_cast(get_type(strip_expr(left)), left_false); in handle_comparison()
1568 tmp_true = rl_truncate_cast(get_type(strip_expr(left)), tmp_true); in handle_comparison()
1569 tmp_false = rl_truncate_cast(get_type(strip_expr(left)), tmp_false); in handle_comparison()
1571 __save_imaginary_state(left, tmp_true, tmp_false); in handle_comparison()
1594 if (get_implied_value(right, &dummy) && !in_macro(left, right)) in handle_comparison()
1596 if (get_implied_value(left, &dummy) && !in_macro(left, right)) in handle_comparison()
1603 if (get_implied_value(left, &dummy) && !in_macro(left, right)) in handle_comparison()
1605 if (get_implied_value(right, &dummy) && !in_macro(left, right)) in handle_comparison()
1626 if (get_hard_max(left, &hard_max)) { in handle_comparison()
1632 if (get_implied_value(left, &hard_max)) { in handle_comparison()
1642 if (get_hard_max(left, &hard_max)) { in handle_comparison()
1647 if (get_implied_value(left, &hard_max)) { in handle_comparison()
1667 if (get_hard_max(left, &hard_max)) in handle_comparison()
1674 if (get_hard_max(left, &hard_max)) { in handle_comparison()
1720 set_extra_expr_true_false(left, left_true_state, left_false_state); in handle_comparison()
1763 *expr_p = expr->left; in move_known_to_rl()
1770 if (get_implied_value(expr->left, &sval)) { in move_known_to_rl()
1780 struct expression *left = *left_p; in move_known_values() local
1784 if (get_implied_value(left, &sval)) { in move_known_values()
1796 *left_p = binop_expression(left, invert_op(right->op), right->right); in move_known_values()
1797 *right_p = right->left; in move_known_values()
1800 if (right->op == '+' && get_value(right->left, &sval)) { in move_known_values()
1801 *left_p = binop_expression(left, invert_op(right->op), right->left); in move_known_values()
1806 *left_p = binop_expression(left, invert_op(right->op), right->right); in move_known_values()
1807 *right_p = right->left; in move_known_values()
1813 if (!is_simple_math(left)) in move_known_values()
1815 if (get_implied_value(left, &dummy)) in move_known_values()
1817 if (left->op == '*') { in move_known_values()
1820 if (!get_value(left->right, &divisor)) in move_known_values()
1824 *right_p = binop_expression(right, invert_op(left->op), left->right); in move_known_values()
1825 *left_p = left->left; in move_known_values()
1828 if (left->op == '+' && get_value(left->left, &sval)) { in move_known_values()
1829 *right_p = binop_expression(right, invert_op(left->op), left->left); in move_known_values()
1830 *left_p = left->right; in move_known_values()
1834 if (get_value(left->right, &sval)) { in move_known_values()
1835 *right_p = binop_expression(right, invert_op(left->op), left->right); in move_known_values()
1836 *left_p = left->left; in move_known_values()
1852 struct expression *left = *left_p; in do_simple_algebra() local
1857 if (left->type != EXPR_BINOP || left->op != '+') in do_simple_algebra()
1859 if (can_integer_overflow(get_type(left), left)) in do_simple_algebra()
1864 if (!get_implied_value(left->left, &tmp) && in do_simple_algebra()
1865 get_implied_rl(left->left, &rl) && in do_simple_algebra()
1867 *right_p = binop_expression(right, '-', left->left); in do_simple_algebra()
1868 *left_p = left->right; in do_simple_algebra()
1871 if (!get_implied_value(left->right, &tmp) && in do_simple_algebra()
1872 get_implied_rl(left->right, &rl) && in do_simple_algebra()
1874 *right_p = binop_expression(right, '-', left->right); in do_simple_algebra()
1875 *left_p = left->left; in do_simple_algebra()
1884 struct expression *left = strip_expr(expr->left); in match_func_comparison() local
1887 if (left->type == EXPR_CALL || right->type == EXPR_CALL) { in match_func_comparison()
1888 function_comparison(left, expr->op, right); in match_func_comparison()
1898 struct expression *left, *right; in handle_integer_overflow_test() local
1905 left = strip_parens(expr->left); in handle_integer_overflow_test()
1908 if (left->op != '+') in handle_integer_overflow_test()
1924 if (!expr_equiv(left->left, right) && !expr_equiv(left->right, right)) in handle_integer_overflow_test()
1927 get_absolute_min(left->left, &left_min); in handle_integer_overflow_test()
1928 get_absolute_min(left->right, &right_min); in handle_integer_overflow_test()
1931 type = get_type(left); in handle_integer_overflow_test()
1935 set_extra_chunk_true_false(left, NULL, alloc_estate_range(min, max)); in handle_integer_overflow_test()
1941 struct expression *left_orig = strip_parens(expr->left); in match_comparison()
1943 struct expression *left, *right, *tmp; in match_comparison() local
1958 left = left_orig; in match_comparison()
1960 move_known_values(&left, &right); in match_comparison()
1961 handle_comparison(type, left, expr->op, right); in match_comparison()
1963 left = left_orig; in match_comparison()
1965 if (do_simple_algebra(&left, &right)) in match_comparison()
1966 handle_comparison(type, left, expr->op, right); in match_comparison()
1970 left = prev; in match_comparison()
1972 move_known_values(&left, &right); in match_comparison()
1973 handle_comparison(type, left, expr->op, right); in match_comparison()
1978 left = left_orig; in match_comparison()
1980 move_known_values(&left, &right); in match_comparison()
1981 handle_comparison(type, left, expr->op, right); in match_comparison()
1985 left = left_orig; in match_comparison()
1988 left = get_last_expr_from_expression_stmt(left_orig); in match_comparison()
2000 while ((tmp = get_assigned_expr(left))) { in match_comparison()
2003 left = strip_expr(tmp); in match_comparison()
2012 handle_comparison(type, left, expr->op, right); in match_comparison()
2043 mask = strip_expr(expr->left); in handle_bit_test()
2045 shift = strip_expr(expr->left); in handle_bit_test()
2050 if (!get_implied_value(shift->left, &sval) || sval.value != 1) in handle_bit_test()
2062 rl_max(orig_rl).uvalue > type_bits(get_type(shift->left))) in handle_bit_test()
2127 if (get_implied_value(expr->left, &known)) in handle_AND_condition()
2130 handle_AND_op(expr->left, known); in handle_AND_condition()
2143 get_absolute_rl(expr->left, &orig_rl); in handle_MOD_condition()
2191 set_extra_expr_true_false(expr->left, in handle_MOD_condition()
2213 __extra_match_condition(expr->left); in __extra_match_condition()
2572 set_extra_expr_nomod(arg->left, alloc_estate_rl(left_rl)); in db_param_limit_binops()
2757 type = get_member_type_from_key(expr->left, key); in db_param_value()
2758 name = get_variable_from_key(expr->left, key, &sym); in db_param_value()