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
This commit is contained in:
parent
7fcbfb22d5
commit
0003feb203
|
@ -1,3 +1,16 @@
|
|||
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.
|
||||
|
||||
Thu Jan 21 01:59:30 1999 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* cse.c (fold_rtx): Revert 29 Dec change.
|
||||
|
|
|
@ -1136,12 +1136,16 @@ operand_subword (op, i, validate_address, mode)
|
|||
if (mode == VOIDmode)
|
||||
abort ();
|
||||
|
||||
/* If OP is narrower than a word or if we want a word outside OP, fail. */
|
||||
/* If OP is narrower than a word, fail. */
|
||||
if (mode != BLKmode
|
||||
&& (GET_MODE_SIZE (mode) < UNITS_PER_WORD
|
||||
|| (i + 1) * UNITS_PER_WORD > GET_MODE_SIZE (mode)))
|
||||
&& (GET_MODE_SIZE (mode) < UNITS_PER_WORD))
|
||||
return 0;
|
||||
|
||||
/* If we want a word outside OP, return zero. */
|
||||
if (mode != BLKmode
|
||||
&& (i + 1) * UNITS_PER_WORD > GET_MODE_SIZE (mode))
|
||||
return const0_rtx;
|
||||
|
||||
/* If OP is already an integer word, return it. */
|
||||
if (GET_MODE_CLASS (mode) == MODE_INT
|
||||
&& GET_MODE_SIZE (mode) == UNITS_PER_WORD)
|
||||
|
|
|
@ -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));
|
||||
|
|
18
gcc/tm.texi
18
gcc/tm.texi
|
@ -966,18 +966,18 @@ Like PCC_BITFIELD_TYPE_MATTERS except that its effect is limited to
|
|||
aligning a bitfield within the structure.
|
||||
|
||||
@findex ROUND_TYPE_SIZE
|
||||
@item ROUND_TYPE_SIZE (@var{struct}, @var{size}, @var{align})
|
||||
Define this macro as an expression for the overall size of a structure
|
||||
(given by @var{struct} as a tree node) when the size computed from the
|
||||
fields is @var{size} and the alignment is @var{align}.
|
||||
@item ROUND_TYPE_SIZE (@var{type}, @var{computed}, @var{specified})
|
||||
Define this macro as an expression for the overall size of a type
|
||||
(given by @var{type} as a tree node) when the size computed in the
|
||||
usual way is @var{computed} and the alignment is @var{specified}.
|
||||
|
||||
The default is to round @var{size} up to a multiple of @var{align}.
|
||||
The default is to round @var{computed} up to a multiple of @var{specified}.
|
||||
|
||||
@findex ROUND_TYPE_ALIGN
|
||||
@item ROUND_TYPE_ALIGN (@var{struct}, @var{computed}, @var{specified})
|
||||
Define this macro as an expression for the alignment of a structure
|
||||
(given by @var{struct} as a tree node) if the alignment computed in the
|
||||
usual way is @var{computed} and the alignment explicitly specified was
|
||||
@item ROUND_TYPE_ALIGN (@var{type}, @var{computed}, @var{specified})
|
||||
Define this macro as an expression for the alignment of a type (given
|
||||
by @var{type} as a tree node) if the alignment computed in the usual
|
||||
way is @var{computed} and the alignment explicitly specified was
|
||||
@var{specified}.
|
||||
|
||||
The default is to use @var{specified} if it is larger; otherwise, use
|
||||
|
|
|
@ -3634,7 +3634,7 @@ output_constant_pool (fnname, fndecl)
|
|||
#endif
|
||||
|
||||
if (pool->align > 1)
|
||||
ASM_OUTPUT_ALIGN (asm_out_file, exact_log2 (pool->align));
|
||||
ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (pool->align));
|
||||
|
||||
/* Output the label. */
|
||||
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LC", pool->labelno);
|
||||
|
|
Loading…
Reference in New Issue