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;