aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorVladimir N. Makarov <vmakarov@cygnus.com>1999-01-21 11:20:09 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>1999-01-21 11:20:09 +0000
commit0003feb203c94e5ed853432b8c8be9079761244e (patch)
treef114752156844ccab9b23e5e93c21da5cfb7268f /gcc/stor-layout.c
parent7fcbfb22d5ed702003945f2b4662ccf30e99a8a3 (diff)
downloadgcc-0003feb203c94e5ed853432b8c8be9079761244e.zip
gcc-0003feb203c94e5ed853432b8c8be9079761244e.tar.gz
gcc-0003feb203c94e5ed853432b8c8be9079761244e.tar.bz2
varasm.c (output_constant_pool): Use floor_log2 instead of exact_log2 for ASM_OUTPUT_ALIGN.
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. From-SVN: r24800
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 1379811..a712664 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));