c frontend doesn't case about modulo_shift, rename modes to uppercase so it dumps...
authorMatthias Braun <matze@braunis.de>
Tue, 11 Nov 2008 19:56:32 +0000 (19:56 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 11 Nov 2008 19:56:32 +0000 (19:56 +0000)
[r23580]

ast2firm.c

index ac6e088..114ae46 100644 (file)
@@ -165,23 +165,23 @@ static ir_mode *init_atomic_ir_mode(atomic_type_kind_t kind)
                unsigned        bit_size     = size * 8;
                bool            is_signed    = (flags & ATOMIC_TYPE_FLAG_SIGNED) != 0;
                ir_mode_arithmetic arithmetic;
-               unsigned        modulo_shift;
 
                if (flags & ATOMIC_TYPE_FLAG_INTEGER) {
                        assert(! (flags & ATOMIC_TYPE_FLAG_FLOAT));
-                       snprintf(name, sizeof(name), "i%s%u", is_signed ? "" : "u", bit_size);
+                       snprintf(name, sizeof(name), "%s%u", is_signed ? "I" : "U",
+                                bit_size);
                        sort         = irms_int_number;
                        arithmetic   = irma_twos_complement;
-                       modulo_shift = bit_size < machine_size ? machine_size : bit_size;
                } else {
                        assert(flags & ATOMIC_TYPE_FLAG_FLOAT);
-                       snprintf(name, sizeof(name), "f%u", bit_size);
+                       snprintf(name, sizeof(name), "F%u", bit_size);
                        sort         = irms_float_number;
                        arithmetic   = irma_ieee754;
-                       modulo_shift = 0;
                }
+               /* note: modulo_shift is 0, as in C it's undefined anyway to shift
+                * a too big amount */
                return new_ir_mode(name, sort, bit_size, is_signed, arithmetic,
-                                  modulo_shift);
+                                  0);
        }
 
        return NULL;