X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbestabs.c;h=a636a27e63221fb834097b40a707c15d29b27970;hb=89dc24503c04139bb05504059b291d6d89f99661;hp=07a60e2dc90f2b7464f178cd1b1aa56dcb53f83b;hpb=e583a06de4edba3c20d80c7afe895fd9ea50ac24;p=libfirm diff --git a/ir/be/bestabs.c b/ir/be/bestabs.c index 07a60e2dc..a636a27e6 100644 --- a/ir/be/bestabs.c +++ b/ir/be/bestabs.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -207,7 +207,7 @@ static void gen_primitive_type(stabs_handle *h, ir_type *tp) { type_num = get_type_number(h, tp); - if (mode_is_int(mode) || mode_is_character(mode)) { + if (mode_is_int(mode)) { char buf[64]; fprintf(h->f, "\t.stabs\t\"%s:t%u=r%u;", get_type_name(tp), type_num, type_num); tarval_snprintf(buf, sizeof(buf), get_mode_min(mode)); @@ -353,7 +353,8 @@ static void gen_struct_union_type(wenv_t *env, ir_type *tp) { for (i = 0, n = get_compound_n_members(tp); i < n; ++i) { ir_entity *ent = get_compound_member(tp, i); ir_type *mtp = get_entity_type(ent); - int ofs, size; + int ofs; + unsigned size; if (! IS_TYPE_READY(mtp)) waitq_put(env->wq, mtp); @@ -368,11 +369,11 @@ static void gen_struct_union_type(wenv_t *env, ir_type *tp) { int bofs; type_num = get_type_number(h, tp); - size = get_type_size_bits(tp); + size = get_type_size_bytes(tp) * 8; bofs = (ofs + get_entity_offset(ent)) * 8 + get_entity_offset_bits_remainder(ent); /* name:type, bit offset from the start of the struct', number of bits in the element. */ - fprintf(h->f, "%s:%u,%d,%d;", get_entity_name(ent), type_num, bofs, size); + fprintf(h->f, "%s:%u,%d,%u;", get_entity_name(ent), type_num, bofs, size); } } else { /* no bitfield */ @@ -390,8 +391,8 @@ static void gen_struct_union_type(wenv_t *env, ir_type *tp) { /* name:type, bit offset from the start of the struct', number of bits in the element. */ fprintf(h->f, "%u", type_num); } - size = get_type_size_bits(mtp); - fprintf(h->f, ",%d,%d;", ofs * 8, size); + size = get_type_size_bytes(mtp) * 8; + fprintf(h->f, ",%d,%u;", ofs * 8, size); } } fprintf(h->f, ";\",%d,0,0,0\n", N_LSYM);