summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-21 11:20:09 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-21 11:20:09 +0000
commit10c64b6abc02bf694bf515e200138d8cf429a99c (patch)
treef114752156844ccab9b23e5e93c21da5cfb7268f /gcc/stor-layout.c
parent263d9df3b11a154187eaa253d5ebef9517c34e53 (diff)
downloadgcc-10c64b6abc02bf694bf515e200138d8cf429a99c.tar.gz
Thu Jan 21 14:13:31 1999 Vladimir N. Makarov <vmakarov@cygnus.com>
* varasm.c (output_constant_pool): Use floor_log2 instead of exact_log2 for ASM_OUTPUT_ALIGN. * stor-layout.c (layout_type): Do machine-dependent extra alignment. * emit-rtl.c (operand_subword): Handle case when a subword outside the operand. * tm.texi (ROUND_TYPE_{SIZE,ALIGN}): More accurate descriptions of the macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24800 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 1379811cea7..a712664843f 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1085,6 +1085,18 @@ layout_type (type)
&& TREE_CODE (type) != ARRAY_TYPE)))
TYPE_ALIGN (type) = GET_MODE_ALIGNMENT (TYPE_MODE (type));
+ /* Do machine-dependent extra alignment. */
+#ifdef ROUND_TYPE_ALIGN
+ TYPE_ALIGN (type)
+ = ROUND_TYPE_ALIGN (type, TYPE_ALIGN (type), BITS_PER_UNIT);
+#endif
+
+#ifdef ROUND_TYPE_SIZE
+ if (TYPE_SIZE (type) != 0)
+ TYPE_SIZE (type)
+ = ROUND_TYPE_SIZE (type, TYPE_SIZE (type), TYPE_ALIGN (type));
+#endif
+
/* Evaluate nonconstant size only once, either now or as soon as safe. */
if (TYPE_SIZE (type) != 0 && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
TYPE_SIZE (type) = variable_size (TYPE_SIZE (type));