Commit ad6a7ba6 authored by Michael Beck's avatar Michael Beck
Browse files

Add case for symconst_enum_const kind SymConsts

parent 9de3e5c0
......@@ -185,6 +185,11 @@ static void do_dump_atomic_init(struct obstack *obst, ir_node *init)
obstack_printf(obst, "%d", get_type_alignment_bytes(get_SymConst_type(init)));
break;
case symconst_enum_const:
tv = get_enumeration_value(get_SymConst_enum(init));
dump_arith_tarval(obst, tv, bytes);
break;
default:
assert(0 && "dump_atomic_init(): don't know how to init from this SymConst");
}
......
......@@ -149,8 +149,6 @@ static void do_dump_atomic_init(struct obstack *obst, ir_node *init)
case iro_SymConst:
switch (get_SymConst_kind(init)) {
char buf[128];
case symconst_addr_name:
obstack_printf(obst, "%s", get_id_str(get_SymConst_name(init)));
break;
......@@ -168,8 +166,8 @@ static void do_dump_atomic_init(struct obstack *obst, ir_node *init)
break;
case symconst_enum_const:
tarval_snprintf(buf, sizeof(buf), get_enumeration_value(get_SymConst_enum(init)));
obstack_printf(obst, "%s", buf);
tv = get_enumeration_value(get_SymConst_enum(init));
dump_arith_tarval(obst, tv, bytes);
break;
default:
......
......@@ -149,6 +149,11 @@ static void do_dump_atomic_init(struct obstack *obst, ir_node *init)
obstack_printf(obst, "%d", get_type_alignment_bytes(get_SymConst_type(init)));
break;
case symconst_enum_const:
tv = get_enumeration_value(get_SymConst_enum(init));
dump_arith_tarval(obst, tv, bytes);
break;
default:
assert(0 && "dump_atomic_init(): don't know how to init from this SymConst");
}
......
......@@ -86,13 +86,13 @@ static void dump_arith_tarval(struct obstack *obst, tarval *tv, int bytes)
case 4:
obstack_printf(obst, "0x%02x%02x%02x%02x",
get_tarval_sub_bits(tv, 3), get_tarval_sub_bits(tv, 2), get_tarval_sub_bits(tv, 1), get_tarval_sub_bits(tv, 0));
get_tarval_sub_bits(tv, 3), get_tarval_sub_bits(tv, 2), get_tarval_sub_bits(tv, 1), get_tarval_sub_bits(tv, 0));
break;
case 8:
obstack_printf(obst, "0x%02x%02x%02x%02x%02x%02x%02x%02x",
get_tarval_sub_bits(tv, 7), get_tarval_sub_bits(tv, 6), get_tarval_sub_bits(tv, 5), get_tarval_sub_bits(tv, 4),
get_tarval_sub_bits(tv, 3), get_tarval_sub_bits(tv, 2), get_tarval_sub_bits(tv, 1), get_tarval_sub_bits(tv, 0));
get_tarval_sub_bits(tv, 7), get_tarval_sub_bits(tv, 6), get_tarval_sub_bits(tv, 5), get_tarval_sub_bits(tv, 4),
get_tarval_sub_bits(tv, 3), get_tarval_sub_bits(tv, 2), get_tarval_sub_bits(tv, 1), get_tarval_sub_bits(tv, 0));
break;
case 10:
......@@ -187,6 +187,11 @@ static void do_dump_atomic_init(struct obstack *obst, ir_node *init)
obstack_printf(obst, "%d", get_type_alignment_bytes(get_SymConst_type(init)));
break;
case symconst_enum_const:
tv = get_enumeration_value(get_SymConst_enum(init));
dump_arith_tarval(obst, tv, bytes);
break;
default:
assert(0 && "dump_atomic_init(): don't know how to init from this SymConst");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment