ir_type *new_d_type_method(ident *name, int n_param, int n_res, dbg_info *db) {
ir_type *res;
- assert((get_mode_size_bits(mode_P_code) % 8 != 0) && "unorthodox modes not implemented");
+ assert((get_mode_size_bits(mode_P_code) % 8 == 0) && "unorthodox modes not implemented");
res = new_type(type_method, mode_P_code, name, db);
res->flags |= tf_layout_fixed;
res->size = get_mode_size_bytes(mode_P_code);
void set_enumeration_mode(ir_type *tp, ir_mode *mode) {
assert(mode_is_int(mode) && "Modes of enumerations must be integers");
/* For pointer and enumeration size depends on the mode, but only byte size allowed. */
- assert((get_mode_size_bits(mode) & 7) == 0 && "unorthodox modes not implemented");
+ assert((get_mode_size_bits(mode) % 8) == 0 && "unorthodox modes not implemented");
tp->size = get_mode_size_bytes(mode);
tp->mode = mode;
assert(mode_is_reference(ptr_mode));
res = new_type(type_pointer, ptr_mode, name, db);
res->attr.pa.points_to = points_to;
- assert((get_mode_size_bits(res->mode) % 8 != 0) && "unorthodox modes not implemented");
+ assert((get_mode_size_bits(res->mode) % 8 == 0) && "unorthodox modes not implemented");
res->size = get_mode_size_bytes(res->mode);
res->flags |= tf_layout_fixed;
hook_new_type(res);