/*
- * 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.
*
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);
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 */
/* 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);