Lines Matching refs:mode
63 *do_expression(usage_t mode, struct expression *expr),
64 *do_statement(usage_t mode, struct statement *stmt);
71 static inline usage_t u_rval(usage_t mode) in u_rval() argument
73 return mode & (U_R_VAL | (U_MASK << U_SHIFT)) in u_rval()
77 static inline usage_t u_addr(usage_t mode) in u_addr() argument
79 return mode = mode & U_MASK in u_addr()
80 ? U_R_AOF | (mode & U_W_AOF) : 0; in u_addr()
90 static usage_t fix_mode(struct symbol *type, usage_t mode) in fix_mode() argument
92 mode &= (U_SELF | (U_SELF << U_SHIFT)); in fix_mode()
100 if (mode & U_MASK) in fix_mode()
101 mode &= U_SELF; in fix_mode()
105 if (mode & U_R_VAL) in fix_mode()
106 mode |= U_R_AOF; in fix_mode()
107 mode &= ~(U_R_VAL | U_W_AOF); in fix_mode()
110 if (mode & (U_MASK << U_SHIFT)) in fix_mode()
111 mode >>= U_SHIFT; in fix_mode()
112 else if (mode != U_W_VAL) in fix_mode()
113 mode = u_addr(mode); in fix_mode()
116 if (!(mode & U_R_AOF)) in fix_mode()
117 mode &= ~U_W_AOF; in fix_mode()
119 return mode; in fix_mode()
122 static struct symbol *report_member(usage_t mode, struct position *pos, in report_member() argument
128 reporter->r_member(fix_mode(ret, mode), pos, type, mem); in report_member()
133 static void report_implicit(usage_t mode, struct position *pos, struct symbol *type) in report_implicit() argument
139 reporter->r_member(mode, pos, type, NULL); in report_implicit()
142 report_implicit(mode, pos, base_type(mem))); in report_implicit()
165 static struct symbol *report_symbol(usage_t mode, struct expression *expr) in report_symbol() argument
171 return report_member(mode, &expr->pos, ret, expr->symbol); in report_symbol()
173 reporter->r_symbol(fix_mode(ret, mode), &expr->pos, sym); in report_symbol()
333 static struct symbol *do_expression(usage_t mode, struct expression *expr) in do_expression() argument
353 ret = do_statement(mode, expr->statement); in do_expression()
360 ret = do_expression(mode, expr->right); in do_expression()
367 mode = u_rval(mode); in do_expression()
368 do_expression(mode, expr->left); in do_expression()
369 do_expression(mode, expr->right); in do_expression()
373 ? U_R_VAL : U_R_VAL | mode, in do_expression()
375 ret = do_expression(mode, expr->cond_true); in do_expression()
376 ret = do_expression(mode, expr->cond_false); in do_expression()
390 mode |= U_W_VAL | U_R_VAL; in do_expression()
392 mode &= ~U_R_VAL; in do_expression()
393 ret = do_expression(mode, expr->left); in do_expression()
394 report_implicit(mode, &expr->pos, ret); in do_expression()
395 mode = expr->op == '=' in do_expression()
397 do_expression(mode, expr->right); in do_expression()
401 mode |= u_rval(mode); in do_expression()
402 l = do_expression(mode, expr->left); in do_expression()
403 r = do_expression(mode, expr->right); in do_expression()
418 mode |= U_W_VAL | U_R_VAL; in do_expression()
420 mode |= u_rval(mode); in do_expression()
422 ret = do_expression(mode, unop); in do_expression()
429 do_expression(u_addr(mode), unop); in do_expression()
434 if (mode & (U_MASK << U_SHIFT)) in do_expression()
435 mode |= U_R_VAL; in do_expression()
436 mode <<= U_SHIFT; in do_expression()
437 if (mode & (U_R_AOF << U_SHIFT)) in do_expression()
438 mode |= U_R_VAL; in do_expression()
439 if (mode & (U_W_VAL << U_SHIFT)) in do_expression()
440 mode |= U_W_AOF; in do_expression()
441 ret = do_expression(mode, unop); in do_expression()
451 p_mode = mode & U_SELF; in do_expression()
452 if (!(mode & U_MASK) && (mode & (U_MASK << U_SHIFT))) in do_expression()
456 ret = report_member(mode, &expr->pos, p_type, in do_expression()
480 ret = do_expression(mode, map->expr); in do_expression()
482 ret = do_expression(mode, expr->def); in do_expression()
486 ret = report_symbol(mode, expr); in do_expression()
492 static void do_asm_xputs(usage_t mode, struct asm_operand_list *xputs) in do_asm_xputs() argument
494 DO_LIST(xputs, op, do_expression(U_W_AOF | mode, op->expr)); in do_asm_xputs()
497 static struct symbol *do_statement(usage_t mode, struct statement *stmt) in do_statement() argument
513 ret = do_expression(mode, stmt->expression); in do_statement()
530 ret = do_statement(--count ? U_VOID : mode, st)); in do_statement()
559 do_statement(mode, stmt->label_statement); in do_statement()