/** The list of all currently existing modes. */
static ir_mode **mode_list;
+const char *get_mode_arithmetic_name(ir_mode_arithmetic ari)
+{
+#define X(a) case a: return #a
+ switch (ari) {
+ X(irma_uninitialized);
+ X(irma_none);
+ X(irma_twos_complement);
+ X(irma_ones_complement);
+ X(irma_int_BCD);
+ X(irma_ieee754);
+ X(irma_float_BCD);
+ default: return "<unknown>";
+ }
+#undef X
+}
+
/**
* Compare modes that don't need to have their code field
* correctly set
return get_tarval_nan(mode);
}
-int is_mode(void *thing) {
+int is_mode(const void *thing) {
if (get_kind(thing) == k_ir_mode)
return 1;
else
newmode.name = new_id_from_chars("E", 1);
newmode.code = irm_E;
newmode.sign = 1;
- newmode.size = 80;
+ /* note that the tarval module is calculating with 80 bits, but we use
+ * 96 bits, as that is what will be stored to memory by most hardware */
+ newmode.size = 96;
mode_E = register_mode(&newmode);