aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-08-16 19:03:36 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-08-16 19:03:36 -0700
commit09e07be6d7e6d66b2d48fc20516ce0385cfb268e (patch)
tree976675b45679dc6326128999596a627a51a6a1c0 /gcc
parent8daaf93ce179c7d64e9d3e0f59fb75d61a113ed2 (diff)
downloadgcc-09e07be6d7e6d66b2d48fc20516ce0385cfb268e.zip
gcc-09e07be6d7e6d66b2d48fc20516ce0385cfb268e.tar.gz
gcc-09e07be6d7e6d66b2d48fc20516ce0385cfb268e.tar.bz2
varasm.c (force_const_mem): Keep pool alignment in bits.
* varasm.c (force_const_mem): Keep pool alignment in bits. (output_constant_pool): Use assemble_align. From-SVN: r44952
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/varasm.c13
2 files changed, 10 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 93b902d..e0c4c10 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-08-16 Richard Henderson <rth@redhat.com>
+
+ * varasm.c (force_const_mem): Keep pool alignment in bits.
+ (output_constant_pool): Use assemble_align.
+
2001-08-16 Zack Weinberg <zackw@panix.com>
* doc/tm.texi: Remove extra @table command.
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 57c3aab..4a65020 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -3513,16 +3513,14 @@ force_const_mem (mode, x)
const_rtx_hash_table[hash] = desc;
/* Align the location counter as required by EXP's data type. */
- align = (mode == VOIDmode) ? UNITS_PER_WORD : GET_MODE_SIZE (mode);
- if (align > BIGGEST_ALIGNMENT / BITS_PER_UNIT)
- align = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
+ align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode);
#ifdef CONSTANT_ALIGNMENT
align = CONSTANT_ALIGNMENT (make_tree (type_for_mode (mode, 0), x),
- align * BITS_PER_UNIT) / BITS_PER_UNIT;
+ align);
#endif
- pool_offset += align - 1;
- pool_offset &= ~ (align - 1);
+ pool_offset += (align / BITS_PER_UNIT) - 1;
+ pool_offset &= ~ ((align / BITS_PER_UNIT) - 1);
if (GET_CODE (x) == LABEL_REF)
LABEL_PRESERVE_P (XEXP (x, 0)) = 1;
@@ -3731,8 +3729,7 @@ output_constant_pool (fnname, fndecl)
pool->align, pool->labelno, done);
#endif
- if (pool->align > 1)
- ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (pool->align));
+ assemble_align (pool->align);
/* Output the label. */
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LC", pool->labelno);