fix for last commit
authorMatthias Braun <matze@braunis.de>
Fri, 4 Jan 2008 14:22:01 +0000 (14:22 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 4 Jan 2008 14:22:01 +0000 (14:22 +0000)
[r17160]

ir/tr/type.c

index f72a4f5..a9fc299 100644 (file)
@@ -1184,7 +1184,7 @@ build_value_type(ident *name, int len, tp_ent_pair *tps) {
 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);
@@ -1857,7 +1857,7 @@ int (is_Enumeration_type)(const ir_type *enumeration) {
 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;
@@ -1874,7 +1874,7 @@ ir_type *new_d_type_pointer(ident *name, ir_type *points_to, ir_mode *ptr_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);