/illumos-gate/usr/src/tools/smatch/src/ |
H A D | symbol.c | 88 unsigned long bit_size; member 105 if (sym->bit_size > info->bit_size) in lay_out_union() 106 info->bit_size = sym->bit_size; in lay_out_union() 117 return sym->bit_size; in bitfield_base_size() 125 unsigned long bit_size, align_bit_mask; in lay_out_struct() local 136 bit_size = info->bit_size; in lay_out_struct() 137 base_size = sym->bit_size; in lay_out_struct() 154 unsigned long bit_offset = bit_size & align_bit_mask; in lay_out_struct() 160 bit_size = (bit_size + align_bit_mask) & ~align_bit_mask; in lay_out_struct() 163 sym->offset = bits_to_bytes(bit_size - bit_offset); in lay_out_struct() [all …]
|
H A D | show-parse.c | 77 sym->bit_size, sym->ctype.alignment, in do_debug_symbol() 170 …printf("\t%s:%d:%ld at offset %ld.%d", show_ident(sym->ident), sym->bit_size, sym->ctype.alignment… in show_struct_member() 377 append(name, ":%d", sym->bit_size); in do_show_type() 491 printf("\tmov.%d\t\tretval,%d\n", stmt->ret->bit_size, val); in show_symbol() 605 bits = stmt->ret->bit_size; in show_statement() 748 int size = arg->ctype->bit_size; in show_call_expression() 774 printf("\tmov.%d\t\tv%d,retval\n", expr->ctype->bit_size, retval); in show_call_expression() 802 expr->ctype->bit_size, in show_binop() 829 printf("\t%s.%d\t\tv%d,v%d\n", opname, expr->ctype->bit_size, new, target); in show_regular_preop() 864 bits = expr->ctype->bit_size; in show_assignment() [all …]
|
H A D | compile-i386.c | 331 return get_regclass_bits(expr->ctype->bit_size); in get_regclass() 386 static struct storage *temp_from_bits(unsigned int bit_size) in temp_from_bits() argument 388 return get_reg(get_regclass_bits(bit_size)); in temp_from_bits() 915 static void emit_scalar(struct expression *expr, unsigned int bit_size) in emit_scalar() argument 923 printf("\t.zero\t%d\n", bit_size / 8); in emit_scalar() 929 switch (bit_size) { in emit_scalar() 966 printf("\t.zero\t%d\n", (sym->bit_size / 8) * distance); in emit_initializer() 972 emit_scalar(expr, sym->bit_size / get_expression_value(base_type->array_size)); in emit_initializer() 1064 sym->bit_size / 8); in emit_array() 1075 entry->init_offset / (base_type->bit_size / 8); in emit_array() [all …]
|
H A D | expand.c | 76 long long mask = 1ULL << (expr->ctype->bit_size - 1); in get_longlong() 92 int old_size = oldtype->bit_size; in cast_value() 93 int new_size = newtype->bit_size; in cast_value() 188 if (count >= 0 && count < ctype->bit_size) in check_shift_count() 220 mask = 1ULL << (ctype->bit_size-1); in simplify_int_binop() 327 mask = 1ULL << (ctype->bit_size-1); in simplify_cmp_binop() 517 return left->bit_size < right->bit_size; in compare_types() 519 return left->bit_size > right->bit_size; in compare_types() 521 return left->bit_size <= right->bit_size; in compare_types() 523 return left->bit_size >= right->bit_size; in compare_types() [all …]
|
H A D | evaluate.c | 107 sym->bit_size = bytes_to_bits(length); in evaluate_string() 118 array->bit_size = bytes_to_bits(length); in evaluate_string() 138 int width = type->bit_size; in integer_promotion() 188 if (left->bit_size > right->bit_size) in bigger_int_type() 191 if (right->bit_size > left->bit_size) in bigger_int_type() 209 return orig->bit_size == new->bit_size && in same_cast_type() 316 if (old->ctype->bit_size < type->bit_size) in cast_to() 328 if (old->ctype->bit_size >= type->bit_size) { in cast_to() 468 if ((*type)->bit_size < bits_in_int) in restricted_unop() 612 multiply = is_void_type(base) ? 1 : bits_to_bytes(base->bit_size); in evaluate_ptr_add() [all …]
|
H A D | cse.c | 95 if (!insn->orig_type || insn->orig_type->bit_size < 0) in cse_collect() 100 hash += hashval(insn->orig_type->bit_size); in cse_collect() 245 size1 = i1->orig_type->bit_size; in insn_compare() 246 size2 = i2->orig_type->bit_size; in insn_compare()
|
H A D | ssa.c | 50 if (bf_seen && (type->bit_size > long_ctype.bit_size)) in is_promotable() 58 if (member->bit_size != type->bit_size) in is_promotable()
|
H A D | sparse.c | 122 int old = orig_type->bit_size; in check_cast_instruction() 284 if (sym->bit_size <= 0) in list_compound_symbol() 305 bits_to_bytes(sym->bit_size), in list_compound_symbol()
|
H A D | char.c | 87 type < TOKEN_WIDE_CHAR ? bits_in_char : wchar_ctype->bit_size, token->pos); in get_char_constant() 116 bits = is_wide ? wchar_ctype->bit_size: bits_in_char; in get_string_constant()
|
H A D | sparse-llvm.c | 59 assert(base_type->bit_size > 0); in sym_array_type() 65 return LLVMArrayType(elem_type, sym->bit_size / base_type->bit_size); in sym_array_type() 107 union_size = sym->bit_size / 8; in sym_union_type() 132 switch (sym->bit_size) { in sym_basetype_type() 143 die("invalid bit size %d for type %d", sym->bit_size, sym->type); in sym_basetype_type() 147 switch (sym->bit_size) { in sym_basetype_type() 167 die("invalid bit size %d for type %d", sym->bit_size, sym->type); in sym_basetype_type() 188 ret = LLVMIntType(sym->bit_size); in symbol_type() 921 unsigned int width = otype->bit_size; in output_op_cast()
|
H A D | lib.c | 1175 unsigned bits = type->bit_size - is_signed_type(type); in predefined_max() 1204 unsigned bits = type->bit_size; in predefined_ctype() 1353 predefine("__mips", 1, "%d", ptr_ctype.bit_size); in predefined_macros() 1354 predefine("_MIPS_SZINT", 1, "%d", int_ctype.bit_size); in predefined_macros() 1355 predefine("_MIPS_SZLONG", 1, "%d", long_ctype.bit_size); in predefined_macros() 1356 predefine("_MIPS_SZPTR", 1, "%d", ptr_ctype.bit_size); in predefined_macros() 1374 predefine("__riscv_xlen", 1, "%d", ptr_ctype.bit_size); in predefined_macros()
|
H A D | linearize.c | 56 return type ? type->bit_size > 0 ? type->bit_size : 0 : 0; in type_size() 1008 unsigned int size = ctype->bit_size; in linearize_bitfield_insert() 1010 unsigned long long smask= bits_mask(btype->bit_size); in linearize_bitfield_insert() 1126 if (ctype->bit_size != type_size(btype)) in linearize_load_gen() 1292 if (dst->bit_size == src->bit_size) in get_cast_opcode() 1336 if (dst->bit_size ==src->bit_size) in get_cast_opcode() 1338 if (dst->bit_size < src->bit_size) in get_cast_opcode() 1367 if (from->bit_size < 0 || to->bit_size < 0) in cast_pseudo() 1374 if (from->bit_size == to->bit_size) in cast_pseudo() 1384 if (from->bit_size == to->bit_size) in cast_pseudo()
|
H A D | symbol.h | 168 int bit_size; member 413 return type->bit_size == bits_in_char && type->type != SYM_BITFIELD; in is_byte_type() 492 unsigned size = ctype->bit_size; in extend_value()
|
H A D | simplify.c | 501 unsigned int orig_size = src->orig_type->bit_size; in operand_size() 1007 if (value && (def->orig_type->bit_size == 1)) in simplify_seteq_setne() 1031 def->size = def->type->bit_size; in simplify_seteq_setne() 1056 osize = def->orig_type->bit_size; in simplify_constant_mask() 1292 mask = 1ULL << (insn->orig_type->bit_size-1); in simplify_constant_unop() 1507 if (size != def->orig_type->bit_size) in simplify_cast() 1527 osize = def->orig_type->bit_size; in simplify_cast()
|
H A D | flow.c | 476 if (sym->bit_size > 0 && (offset < 0 || bit > sym->bit_size)) { in check_access() 482 bits_to_bytes(sym->bit_size)); in check_access()
|
H A D | ir.c | 114 if (ctype && ctype->bit_size > 0 && insn->src == VOID) { in check_return()
|
H A D | c2xml.c | 162 newNumProp(node, "bit-size", sym->bit_size); in examine_layout()
|
H A D | expression.c | 131 decl->bit_size = array->bit_size = bytes_to_bits(len + 1); in handle_func()
|
H A D | parse.c | 844 int shift = type->bit_size; in type_is_ok() 863 unsigned int size = type->bit_size; in type_range() 907 if (ctype->bit_size == base_type->bit_size) { in cast_enum_list() 1932 bitfield->bit_size = width; in handle_bitfield() 1958 bitfield->bit_size = width; in handle_bitfield()
|
H A D | builtin.c | 214 switch (expr->ctype->bit_size) { in expand_bswap()
|
H A D | smatch_type.c | 59 return bits_to_bytes(type->bit_size); in array_bytes()
|
H A D | example.c | 1028 unsigned int old = insn->orig_type ? insn->orig_type->bit_size : 0; in generate_cast() 1827 int bits = argtype ? argtype->bit_size : 0; in set_up_arch_entry()
|
H A D | smatch.h | 1340 return type->bit_size; in type_bits()
|