Commit b1254b72 by Richard Kenner Committed by Richard Kenner

* stor-layout.c (place_field): Set rli->offset_align properly.

From-SVN: r33262
parent ecb36604
Wed Apr 19 12:14:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* stor-layout.c (place_field): Set rli->offset_align properly.
2000-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2000-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mips.h (BITS_PER_WORD, UNITS_PER_WORD, UNITS_PER_FPREG, * mips.h (BITS_PER_WORD, UNITS_PER_WORD, UNITS_PER_FPREG,
......
...@@ -753,6 +753,9 @@ place_field (rli, field) ...@@ -753,6 +753,9 @@ place_field (rli, field)
rli->offset = round_up (rli->offset, desired_align / BITS_PER_UNIT); rli->offset = round_up (rli->offset, desired_align / BITS_PER_UNIT);
} }
if (! TREE_CONSTANT (rli->offset))
rli->offset_align = desired_align;
} }
/* Handle compatibility with PCC. Note that if the record has any /* Handle compatibility with PCC. Note that if the record has any
...@@ -821,9 +824,6 @@ place_field (rli, field) ...@@ -821,9 +824,6 @@ place_field (rli, field)
} }
#endif #endif
if (! TREE_CONSTANT (rli->offset))
rli->offset_align = DECL_ALIGN (field);
/* Offset so far becomes the position of this field after normalizing. */ /* Offset so far becomes the position of this field after normalizing. */
normalize_rli (rli); normalize_rli (rli);
DECL_FIELD_OFFSET (field) = rli->offset; DECL_FIELD_OFFSET (field) = rli->offset;
...@@ -866,6 +866,7 @@ place_field (rli, field) ...@@ -866,6 +866,7 @@ place_field (rli, field)
rli->offset rli->offset
= size_binop (PLUS_EXPR, rli->offset, DECL_SIZE_UNIT (field)); = size_binop (PLUS_EXPR, rli->offset, DECL_SIZE_UNIT (field));
rli->bitpos = bitsize_zero_node; rli->bitpos = bitsize_zero_node;
rli->offset_align = MIN (rli->offset_align, DECL_ALIGN (field));
} }
else else
{ {
......
Markdown is supported
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