Home
last modified time | relevance | path

Searched refs:right (Results 1 – 25 of 414) sorted by relevance

12345678910>>...17

/illumos-gate/usr/src/common/crypto/blowfish/
H A Dblowfish_impl.c361 #define ROUND(left, right, i) \ argument
363 (right) ^= F((left)); \
365 (left) = (right); \
366 (right) = tmp;
379 uint32_t left, right, tmp; in blowfish_encrypt_block() local
389 right = b32[1]; in blowfish_encrypt_block()
398 right = htonl(*(uint32_t *)(void *)&block[4]); in blowfish_encrypt_block()
404 right = ((uint32_t)block[4] << 24) in blowfish_encrypt_block()
411 ROUND(left, right, 0); in blowfish_encrypt_block()
412 ROUND(left, right, 1); in blowfish_encrypt_block()
[all …]
/illumos-gate/usr/src/tools/smatch/src/
H A Dcheck_or_vs_and.c42 static int inconsistent_check(struct expression *left, struct expression *right) in inconsistent_check() argument
47 if (get_value(right->left, &sval)) in inconsistent_check()
48 return expr_equiv_no_inc_dec(left->right, right->right); in inconsistent_check()
49 if (get_value(right->right, &sval)) in inconsistent_check()
50 return expr_equiv_no_inc_dec(left->right, right->left); in inconsistent_check()
53 if (get_value(left->right, &sval)) { in inconsistent_check()
54 if (get_value(right->left, &sval)) in inconsistent_check()
55 return expr_equiv_no_inc_dec(left->left, right->right); in inconsistent_check()
56 if (get_value(right->right, &sval)) in inconsistent_check()
57 return expr_equiv_no_inc_dec(left->left, right->left); in inconsistent_check()
[all …]
H A Dsmatch_struct_assignment.c88 static struct expression *get_right_base_expr(struct symbol *left_type, struct expression *right) in get_right_base_expr() argument
92 if (!right) in get_right_base_expr()
95 struct_type = get_struct_type(right); in get_right_base_expr()
101 if (right->type == EXPR_PREOP && right->op == '&') in get_right_base_expr()
102 right = strip_expr(right->unop); in get_right_base_expr()
104 if (right->type == EXPR_CALL) in get_right_base_expr()
107 if (is_pointer(right)) in get_right_base_expr()
108 right = deref_expression(right); in get_right_base_expr()
110 return right; in get_right_base_expr()
149 static void handle_non_struct_assignments(struct expression *left, struct expression *right) in handle_non_struct_assignments() argument
[all …]
H A Dcheck_64bit_shift.c25 struct expression *right, *shifter; in match_shift_mask() local
36 if (type_bits(get_type(expr->right)) == 64) in match_shift_mask()
39 right = strip_expr(expr->right); in match_shift_mask()
40 if (right->type != EXPR_BINOP || right->op != SPECIAL_LEFTSHIFT) in match_shift_mask()
43 shifter = strip_expr(right->right); in match_shift_mask()
48 str = expr_to_str(expr->right); in match_shift_mask()
56 struct expression *right; in match_shift_assignment() local
61 right = strip_expr(expr->right); in match_shift_assignment()
62 if (right->type != EXPR_BINOP || right->op != SPECIAL_LEFTSHIFT) in match_shift_assignment()
69 right_type = get_type(expr->right); in match_shift_assignment()
[all …]
H A Dsmatch_sval.c462 static sval_t sval_binop_unsigned(struct symbol *type, sval_t left, int op, sval_t right) in sval_binop_unsigned() argument
469 ret.uvalue = left.uvalue * right.uvalue; in sval_binop_unsigned()
472 if (right.uvalue == 0) { in sval_binop_unsigned()
476 ret.uvalue = left.uvalue / right.uvalue; in sval_binop_unsigned()
480 ret.uvalue = left.uvalue + right.uvalue; in sval_binop_unsigned()
483 ret.uvalue = left.uvalue - right.uvalue; in sval_binop_unsigned()
486 if (right.uvalue == 0) { in sval_binop_unsigned()
490 ret.uvalue = left.uvalue % right.uvalue; in sval_binop_unsigned()
494 ret.uvalue = left.uvalue | right.uvalue; in sval_binop_unsigned()
497 ret.uvalue = left.uvalue & right.uvalue; in sval_binop_unsigned()
[all …]
H A Dsmatch_constraints_required.c99 struct expression *left, *right; in handle_zero_size_arrays() local
125 right = strip_expr(size->right); in handle_zero_size_arrays()
132 if (right->type == EXPR_BINOP && right->op == '*') { in handle_zero_size_arrays()
136 mult_left = strip_expr(right->left); in handle_zero_size_arrays()
137 mult_right = strip_expr(right->right); in handle_zero_size_arrays()
194 mult_right = strip_expr(size->right); in match_alloc_helper()
207 get_implied_value(size->right, &sval) && in match_alloc_helper()
219 call = strip_expr(expr->right); in match_alloc()
233 call = strip_expr(expr->right); in match_calloc()
262 state = get_state_expr(my_id, expr->right); in match_assign_size()
[all …]
H A Dcheck_signed.c54 if (!get_implied_value(expr->right, &sval)) in match_assign()
61 right_name = expr_to_str(expr->right); in match_assign()
70 if (expr->right->type == EXPR_PREOP && expr->right->op == '~') in match_assign()
99 if (!get_value(expr->right, &known) || known.value != 0) in cap_gt_zero_and_lt()
107 struct expression *right = strip_expr(tmp->right); in cap_gt_zero_and_lt() local
109 if (right->op != '<' && in cap_gt_zero_and_lt()
110 right->op != SPECIAL_UNSIGNED_LT && in cap_gt_zero_and_lt()
111 right->op != SPECIAL_LTE && in cap_gt_zero_and_lt()
112 right->op != SPECIAL_UNSIGNED_LTE) in cap_gt_zero_and_lt()
119 name2 = expr_to_str(right->left); in cap_gt_zero_and_lt()
[all …]
H A Dsmatch_conditions.c85 tmp = expr->right; in handle_zero_comparisons()
86 } else if (expr_is_zero(expr->right)) { in handle_zero_comparisons()
89 __split_expr(expr->right); in handle_zero_comparisons()
200 split_conditions(expr->right); in handle_logical()
360 split_conditions(expr->right); in handle_comma()
424 expr_set_parent_expr(expr->right, expr); in split_conditions()
432 expr_set_parent_expr(expr->right, expr); in split_conditions()
438 expr_set_parent_expr(expr->right, expr); in split_conditions()
461 expr_set_parent_expr(expr->right, expr); in split_conditions()
477 if (expr->right->type != EXPR_POSTOP) in split_conditions()
[all …]
H A Dsmatch_extra.c183 (faked->type == EXPR_ASSIGNMENT && is_fresh_alloc(faked->right))) in set_extra_mod_helper()
596 … get_countdown_info(struct expression *condition, struct expression **unop, int *op, sval_t *right) in get_countdown_info() argument
602 right->type = &int_ctype; in get_countdown_info()
603 right->value = 0; in get_countdown_info()
612 if (!get_value(condition->right, &limit)) in get_countdown_info()
623 *right = limit; in get_countdown_info()
647 sval_t start, right; in handle_canonical_while_count_down() local
649 right.type = &int_ctype; in handle_canonical_while_count_down()
650 right.value = 0; in handle_canonical_while_count_down()
656 if (!get_countdown_info(condition, &unop, &op, &right)) in handle_canonical_while_count_down()
[all …]
H A Dsmatch_comparison.c40 static void add_comparison(struct expression *left, int comparison, struct expression *right);
73 struct expression *right, in alloc_compare_state() argument
86 data->right = right; in alloc_compare_state()
209 struct range_list *left, *right; in comparison_from_extra() local
213 if (!get_implied_rl(b, &right)) in comparison_from_extra()
216 return rl_comparison(left, right); in comparison_from_extra()
262 data->right, data->right_var, data->right_vsl); in unmatched_comparison()
552 extra = comparison_from_extra(data->left, data->right); in pre_merge_hook()
564 data->right, data->right_var, data->right_vsl)); in pre_merge_hook()
579 data->right, data->right_var, data->right_vsl); in merge_compare_states()
[all …]
H A Dsmatch_integer_overflow.c56 struct expression *left, *right, *binop; in match_divide() local
70 right = strip_parens(expr->right); in match_divide()
72 if (right->type != EXPR_BINOP || right->op != '/') in match_divide()
74 if (!get_value(right->left, &max)) in match_divide()
87 binop = binop_expression(left, '*', right->right); in match_divide()
98 struct expression *left, *right; in match_overflow_to_less_than() local
110 right = strip_parens(expr->right); in match_overflow_to_less_than()
121 if (!expr_equiv(left->left, right) && !expr_equiv(left->right, right)) in match_overflow_to_less_than()
170 get_absolute_max(expr->right, &rmax); in can_integer_overflow()
230 int right = -1; in check_links() local
[all …]
H A Dexpand.c183 static bool check_shift_count(struct expression *expr, struct expression *right) in check_shift_count() argument
186 long long count = get_longlong(right); in check_shift_count()
204 struct expression *left = expr->left, *right = expr->right; in simplify_int_binop() local
209 if (right->type != EXPR_VALUE) in simplify_int_binop()
211 r = right->value; in simplify_int_binop()
213 if (!check_shift_count(expr, right)) in simplify_int_binop()
218 l = left->value; r = right->value; in simplify_int_binop()
306 expr->taint = left->taint | right->taint; in simplify_int_binop()
320 struct expression *left = expr->left, *right = expr->right; in simplify_cmp_binop() local
324 if (left->type != EXPR_VALUE || right->type != EXPR_VALUE) in simplify_cmp_binop()
[all …]
H A Dcheck_logical_instead_of_bitwise.c44 if (!get_value(expr->right, &sval)) { in match_logic()
57 struct expression *right; in match_assign() local
59 right = strip_expr(expr->right); in match_assign()
60 if (right->type != EXPR_LOGICAL) in match_assign()
62 if (is_bitshift(right->left) || is_bitshift(right->right)) in match_assign()
H A Dsmatch_bits.c202 static struct bit_info *binfo_AND(struct bit_info *left, struct bit_info *right) in binfo_AND() argument
207 if (!left && !right) { in binfo_AND()
210 possible = right->possible; in binfo_AND()
211 } else if (!right) { in binfo_AND()
214 set = left->set & right->set; in binfo_AND()
215 possible = left->possible & right->possible; in binfo_AND()
221 static struct bit_info *binfo_OR(struct bit_info *left, struct bit_info *right) in binfo_OR() argument
226 if (!left && !right) { in binfo_OR()
229 set = right->set; in binfo_OR()
230 } else if (!right) { in binfo_OR()
[all …]
H A Dcheck_precedence.c64 if (expr->left->type == EXPR_COMPARE || expr->right->type == EXPR_COMPARE) in match_condition()
69 if (expr->right->op == '!') in match_condition()
71 if (is_bool(expr->right)) in match_condition()
82 if (expr->left->type == EXPR_COMPARE || expr->right->type == EXPR_COMPARE) in match_condition()
96 if (is_bool_op(expr->right)) in match_condition()
115 if (expr->right->type != EXPR_BINOP) in match_mask()
117 if (expr->right->op != SPECIAL_RIGHTSHIFT) in match_mask()
127 if (expr->right->type != EXPR_COMPARE) in match_mask_compare()
137 if (expr->right->type != EXPR_BINOP) in match_subtract_shift()
139 if (expr->right->op != '-') in match_subtract_shift()
H A Dsmatch_data_source.c70 struct expression *right; in get_source_assignment() local
75 right = get_assigned_expr(expr); in get_source_assignment()
76 right = strip_expr(right); in get_source_assignment()
77 if (!right) in get_source_assignment()
79 if (right->type != EXPR_CALL || right->fn->type != EXPR_SYMBOL) in get_source_assignment()
81 if (is_fake_call(right)) in get_source_assignment()
83 name = expr_to_str(right->fn); in get_source_assignment()
H A Dsmatch_type_val.c195 if (!is_void_pointer(expr->right)) in is_ignored_fake_assignment()
197 member_name = get_member_name(expr->right); in is_ignored_fake_assignment()
224 offset = get_offset_from_container_of(expr->right); in is_container_of()
246 name = expr_to_str(expr->right); in is_driver_data()
271 name = get_macro_name(expr->right->pos); in is_ignored_macro()
310 expr = strip_expr(expr->right); in is_ignored_function()
361 right_type = get_type(expr->right); in is_uncasted_pointer_assign()
420 struct expression *expr, *right; in is_uncasted_fn_param_from_db() local
445 right = strip_expr(expr->right); in is_uncasted_fn_param_from_db()
446 param = get_param_num(right); in is_uncasted_fn_param_from_db()
[all …]
H A Dsmatch_function_hooks.c279 call_ranged_call_backs(same_range_call_backs, fn, expr->right, expr); in assign_ranged_funcs()
390 struct expression *arg, *left, *right, *tmp, *fake_assign; in fake_a_param_assignment() local
399 right = expr->right; in fake_a_param_assignment()
401 while (right->type == EXPR_ASSIGNMENT) in fake_a_param_assignment()
402 right = strip_expr(right->right); in fake_a_param_assignment()
403 if (!right || right->type != EXPR_CALL) in fake_a_param_assignment()
427 arg = get_argument_from_call_expr(right->args, param); in fake_a_param_assignment()
445 right = gen_expression_from_key(arg, buf); in fake_a_param_assignment()
446 if (!right) /* Mostly fails for binops like [$0 + 4032] */ in fake_a_param_assignment()
448 fake_assign = assign_expression(left, '=', right); in fake_a_param_assignment()
[all …]
H A Dsmatch_about_fn_ptr_arg.c91 link_function_arg(next_fn, 0, strip_expr(expr->right)); in match_assign_param()
149 struct expression *right, *arg; in match_assign_function() local
155 right = strip_expr(expr->right); in match_assign_function()
156 if (right->type == EXPR_PREOP && right->op == '&') in match_assign_function()
157 right = strip_expr(right->unop); in match_assign_function()
159 type = get_type(right); in match_assign_function()
177 link_function_arg(right, 0, arg); in match_assign_function()
181 next_fn = right; in match_assign_function()
H A Dcheck_impossible_mask.c36 unsigned long long left, right;
41 right = find_possible_bits(expr->right);
42 if (!right)
46 return left & right;
47 return left | right;
73 if (!get_implied_value(expr->right, &sval)) in get_possible_bits()
95 if (!get_value(expr->right, &sval)) in match_condition()
/illumos-gate/usr/src/cmd/cron/
H A Delm.c95 struct notice *right; }; member
112 struct key *right; }; member
123 struct index *right; }; member
174 nprev->right = n; in el_init()
181 kprev->right = k; in el_init()
189 indprev->right = ind; in el_init()
196 n->right = NULL; in el_init()
197 nprev->right = n; in el_init()
204 k->right = NULL; in el_init()
205 kprev->right = k; in el_init()
[all …]
/illumos-gate/usr/src/lib/libresolv2/common/isc/
H A Dtree.c107 RET(tree_srch(&(**ppr_tree).right, in tree_srch()
160 if (!tree_trav(&(**ppr_tree).right, pfi_uar)) in tree_trav()
170 tree_mung(&(**ppr_tree).right, pfv_uar); in tree_mung()
196 (*ppr)->right = NULL; in sprout()
234 (*ppr)->left = p1->right; in sprout()
235 p1->right = *ppr; in sprout()
241 p2 = p1->right; in sprout()
242 p1->right = p2->left; in sprout()
245 (*ppr)->left = p2->right; in sprout()
246 p2->right = *ppr; in sprout()
[all …]
/illumos-gate/usr/src/psm/stand/boot/common/
H A Dheap_kmem.c94 Freehdr right; /* Right tree pointer */ member
228 tree = &x->right; in insert()
243 right_hook = &newhdr->right; in insert()
246 newhdr->right = NIL; in insert()
266 left_hook = &x->right; in insert()
267 x = x->right; in insert()
307 right_branch = x->right; in delete()
319 p = &left_branch->right; in delete()
320 left_branch = left_branch->right; in delete()
371 right_branch = x->right; in demote()
[all …]
/illumos-gate/usr/src/cmd/isns/isnsd/
H A Dsched.c94 fk->left->right = fk->right; in il_shift()
95 fk->right->left = fk->left; in il_shift()
107 k = k->right; in il_shift()
124 fk->right = k; in il_shift()
125 k->left->right = fk; in il_shift()
238 kleft->right = k; in el_init()
267 k->right = NULL; in el_init()
268 kleft->right = k; in el_init()
361 k = k->right; in el_add()
379 y->right = k; in el_add()
[all …]
/illumos-gate/usr/src/cmd/make/lib/mksh/
H A Dmisc.cc950 node = node->right; in lookup()
977 if (node->right != 0) { in insert()
978 node = node->right; in insert()
983 node->right = new entry(name, node); in insert()
1014 if (node->right != 0) { in insert()
1015 node = node->right; in insert()
1017 node->right = new entry(name, node); in insert()
1034 entry *right = node->right; in rebalance() local
1037 unsigned rdepth = (right != 0) ? right->depth : 0; in rebalance()
1041 if ((node->left = left->right) != 0) { in rebalance()
[all …]

12345678910>>...17